Skip to content

Latest commit

 

History

History
453 lines (342 loc) · 17.5 KB

File metadata and controls

453 lines (342 loc) · 17.5 KB
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

Get identityProvider

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]

Permissions

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.

HTTP request

GET /identity/identityProviders/{id}

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

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.

Examples

Example 1: Retrieve a social identity provider

Request

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]


Response

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": "******"
}

Example 2: Retrieve a built-in identity provider

Request

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]


Response

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"
}

Example 3: Retrieve an Apple identity provider

Request

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]


Response

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": "******"
}

Example 4: Retrieve an OpenID Connect identity provider (Azure AD B2C tenant)

Request

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]


Response

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"
}

Example 5: Retrieve an OIDC identity provider (External tenant)

Request

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]


Response

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"
    }
  }
}