List identityProviders (deprecated)
Artikel
07/27/2022
2 menit untuk membaca
12 kontributor
Dalam artikel ini
Namespace: microsoft.graph
Caution
This identity provider API is deprecated and will stop returning data after March, 2023. Please use the new identity provider API .
Retrieve all identityProviders in the directory.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions .
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
IdentityProvider.Read.All, IdentityProvider.ReadWrite.All
Delegated (personal Microsoft account)
Not supported.
Application
Not supported.
The work or school account must be a global administrator of the tenant.
HTTP request
GET /identityProviders
Name
Description
Authorization
Bearer {token}. Required.
Request body
Do not supply a request body for this method.
Response
If successful, this method returns 200 OK response code and a collection of identityProviders in JSON representation in the response body.
Example
The following example retrieves all identityProvider .
Request
GET https://graph.microsoft.com/v1.0/identityProviders
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var identityProviders = await graphClient.IdentityProviders
.Request()
.GetAsync();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
const options = {
authProvider,
};
const client = Client.init(options);
let identityProviders = await client.api('/identityProviders')
.get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
IdentityProviderCollectionPage identityProviders = graphClient.identityProviders()
.buildRequest()
.get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
result, err := graphClient.IdentityProviders().Get()
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestResult = $graphServiceClient->identityProviders()->get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
Response
HTTP/1.1 200 OK
Content-type: application/json
{
"value": [
{
"id": "Amazon-OAUTH",
"name": "Login with Amazon",
"type": "Amazon",
"clientId": "56433757-cadd-4135-8431-2c9e3fd68ae8",
"clientSecret": "*****"
}
]
}