| title | Get identityProvider |
|---|---|
| description | Retrieve the properties and relationships of an identityProvider object. |
| ms.localizationpriority | medium |
| doc_type | apiPageType |
| author | brozbab |
| ms.subservice | entra-sign-in |
| ms.date | 11/16/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Get the properties and relationships of the specified identity provider configured in the tenant.
Among the types of providers derived from identityProviderBase, in Microsoft Entra, this operation can get a socialIdentityProvider, appleManagedIdentityProvider (external tenant only), builtinIdentityProvider, or an oidcIdentityProvider (external tenant only) resource.
In Azure AD B2C, this operation can get a socialIdentityProvider, appleManagedIdentityProvider, builtinIdentityProvider, or an openIdConnectIdentityProvider resource.
[!INCLUDE national-cloud-support]
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
The work or school account needs to belong to at least the External Identity Provider Administrator or External Identity User Flow administrator Microsoft Entra role.
GET /identity/identityProviders/{id}| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Don't supply a request body for this method.
If successful, this method returns a 200 OK response code and a JSON representation of a socialIdentityProvider, appleManagedIdentityProvider, builtinIdentityProvider, or oidcIdentityProvider in the response body for a workforce or external tenant.
For an Azure AD B2C tenant, this method returns a 200 OK response code and a JSON representation of a socialIdentityProvider, openIdConnectIdentityProvider, appleManagedIdentityProvider, or a builtinIdentityProvider object in the response body.
The following example shows a request.
GET https://graph.microsoft.com/beta/identity/identityProviders/Amazon-OAUTH
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"id": "Amazon-OAUTH",
"displayName": "Amazon",
"identityProviderType": "Amazon",
"clientId": "qazx.1234",
"clientSecret": "******"
}The following example shows a request.
GET https://graph.microsoft.com/beta/identity/identityProviders/MSASignup-OAUTH
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"id": "MSASignup-OAUTH",
"identityProviderType": "MicrosoftAccount",
"displayName": "MicrosoftAccount"
}The following example shows a request.
GET https://graph.microsoft.com/beta/identity/identityProviders/Apple-Managed-OIDC
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"id": "Apple-Managed-OIDC",
"displayName": "Sign in with Apple",
"developerId": "developerId12345",
"serviceId": "com.microsoft.rts.b2c.test.client",
"keyId": "12345",
"certificateData": "******"
}The following example shows a request.
GET https://graph.microsoft.com/beta/identity/identityProviders/Contoso-00001111-aaaa-2222-bbbb-3333cccc4444
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.type": "microsoft.graph.openIdConnectIdentityProvider",
"id": "Contoso-00001111-aaaa-2222-bbbb-3333cccc4444",
"displayName": "Contoso",
"clientId": "00001111-aaaa-2222-bbbb-3333cccc4444",
"clientSecret": "4294967296",
"claimsMapping": {
"userId": "myUserId",
"givenName": "myGivenName",
"surname": "mySurname",
"email": "myEmail",
"displayName": "myDisplayName"
},
"domainHint": "mycustomoidc",
"metadataUrl": "https://mycustomoidc.com/.well-known/openid-configuration",
"responseMode": "form_post",
"responseType": "code",
"scope": "openid"
}The following example shows a request.
GET https://graph.microsoft.com/beta/identity/identityProviders/12345678-abcd-1234-cdef-aaaaaaaaaaaa
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.type": "#microsoft.graph.OidcIdentityProvider",
"id": "12345678-abcd-1234-cdef-aaaaaaaaaaaa",
"displayName": "Contoso",
"clientId": "00001111-aaaa-2222-bbbb-3333cccc4444",
"issuer": "https://contoso.b2clogin.com/00001111-aaaa-2222-bbbb-3333cccc4444/v2.0/",
"wellKnownEndpoint": "https://contoso.b2clogin.com/contoso.onmicrosoft.com/v2.0/.well-known/openid-configuration?p=B2C_1A_SIGNINEMAIL",
"responseType": "code",
"scope": "openid profile email offline_access",
"clientAuthentication": {
"@odata.type": "#microsoft.graph.OIDCClientSecretAuthentication",
"clientSecret": "12345"
},
"inboundClaimMapping": {
"sub": "sub",
"name": "name",
"given_name": "given_name",
"family_name": "family_name",
"email": "email",
"email_verified": "email_verified",
"phone_number": "phone_number",
"phone_number_verified": "phone_number_verified",
"address": {
"street_address": "street_address",
"locality": "locality",
"region": "region",
"postal_code": "postal_code",
"country": "country"
}
}
}