Get identityProvider (deprecated)
Article
08/09/2022
2 minutes to read
12 contributors
Feedback
In this article
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 the properties of an existing identityProvider .
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/{id}
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 JSON representation of the identityProvider in the response body.
Example
The following example retrieves a specific identityProvider .
Request
GET https://graph.microsoft.com/v1.0/identityProviders/Amazon-OAuth
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var identityProvider = await graphClient.IdentityProviders["{identityProvider-id}"]
.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 identityProvider = await client.api('/identityProviders/Amazon-OAuth')
.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();
IdentityProvider identityProvider = graphClient.identityProviders("Amazon-OAuth")
.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.IdentityProvidersById("identityProvider-id").Get(context.Background(), nil)
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->identityProvidersById('identityProvider-id')->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
{
"id": "Amazon-OAUTH",
"type": "Amazon",
"name": "Login with Amazon",
"clientId": "56433757-cadd-4135-8431-2c9e3fd68ae8",
"clientSecret": "*****"
}