You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/api-management/credentials-configure-common-providers.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ services: api-management
5
5
author: dlepow
6
6
ms.service: azure-api-management
7
7
ms.topic: how-to
8
-
ms.date: 10/03/2025
8
+
ms.date: 12/05/2025
9
9
ms.author: danlep
10
10
ms.custom: sfi-image-nochange
11
11
# Customer intent: As an Azure service administrator, I want to learn how to configure common credential providers in the API Management credential manager.
@@ -80,7 +80,11 @@ API Management supports several providers for popular SaaS offerings, including
80
80
81
81
Required settings for these providers differ, depending on the provider, but are similar to those for the [generic OAuth providers](#generic-oauth-providers). Consult the developer documentation for each provider.
82
82
83
+
> [!NOTE]
84
+
> Currently, the Salesforce provider doesn't include an expiry claim in its tokens. As a result, Credential Manager can't detect when these tokens expire and doesn't expose a mechanism to force refresh. With the Salesforce provider, you need custom refresh logic to manually reauthorize the connection to get a new token when the current token expires.
85
+
86
+
83
87
## Related content
84
88
85
89
* Learn more about managing [connections](credentials-overview.md) in API Management.
86
-
* Create a connection for [Microsoft Entra ID](credentials-how-to-azure-ad.md) or [GitHub](credentials-how-to-github.md).
90
+
* Create a connection for [Microsoft Graph API](credentials-how-to-azure-ad.md) or [GitHub API](credentials-how-to-github.md).
This article guides you through the steps required to create a [managed connection](credentials-overview.md) to the Microsoft Graph API within Azure API Management. The authorization code grant type is used in this example.
17
+
This article guides you through the steps required to create a [managed connection](credentials-overview.md) to the Microsoft Graph API within Azure API Management. Use the Microsoft Entra identity provider to call the Microsoft Graph API. This example uses the authorization code grant type.
18
18
19
19
You learn how to:
20
20
@@ -45,28 +45,29 @@ Create a Microsoft Entra application for the API and give it the appropriate per
45
45
46
46
1. Search for and select **Microsoft Entra ID**.
47
47
48
-
1. Under **Manage** on the sidebar menu, select **App registrations**, and then select **+ New registration**.
48
+
1. Under **Manage** on the sidebar menu, select **App registrations**, then select **+ New registration**.
49
49
50
-
1. On the **Register an application** page, enter your application registration settings:
50
+
1. On **Register an application**, enter your application registration settings:
51
51
1. In **Name**, enter a meaningful name for the app, such as *MicrosoftGraphAuth*.
52
52
1. In **Supported account types**, select an option that suits your scenario, for example, **Accounts in this organizational directory only (Single tenant)**.
53
53
1. Set the **Redirect URI** to **Web**, and enter `https://authorization-manager.consent.azure-apim.net/redirect/apim/<YOUR-APIM-SERVICENAME>`, substituting the name of the API Management service where you'll configure the credential provider.
54
54
1. Select **Register**.
55
55
56
56
:::image type="content" source="media/credentials-how-to-azure-ad/create-registration.png" alt-text="Screenshot of creating a Microsoft Entra app registration in the portal.":::
57
57
58
-
1. On the sidebar menu, select **API permissions**, and then select **+ Add a permission**.
58
+
1. On the sidebar menu, select **Manage** > **API permissions**.
59
+
Make sure the permission **User.Read** with the type *Delegated* is already added.
60
+
61
+
1. Select **+ Add a permission**.
59
62
:::image type="content" source="./media/credentials-how-to-azure-ad/add-permission.png" alt-text="Screenshot of adding an API permission in the portal.":::
60
63
61
-
1. Select **Microsoft Graph**, and then select **Delegated permissions**.
62
-
> [!NOTE]
63
-
> Make sure the permission **User.Read** with the type *Delegated* has already been added.
64
-
1. Type **Team**, expand the **Team** options, and then select **Team.ReadBasic.All**. Select **Add permissions**.
64
+
1. Select **Microsoft Graph**, then select **Delegated permissions**.
65
+
1. Type **Team**, expand the **Team** options, then select **Team.ReadBasic.All**. Select **Add permissions**.
65
66
1. Next, select **Grant admin consent for Default Directory**. The status of the permissions changes to **Granted for Default Directory**.
66
67
67
-
1. On the sidebar menu, select **Overview**. On the **Overview** page, find the **Application (client) ID** value and record it for use in Step 2.
68
+
1. On the sidebar menu, select **Overview**. On **Overview**, find the **Application (client) ID** value and record it for use in Step 2.
68
69
69
-
1. On the sidebar menu, select **Certificates & secrets**, and then select **+ New client secret**.
70
+
1. On the sidebar menu, select **Manage** >**Certificates & secrets**, then select **+ New client secret**.
70
71
:::image type="content" source="media/credentials-how-to-azure-ad/create-secret.png" alt-text="Screenshot of creating an app secret in the portal.":::
71
72
72
73
1. Enter a **Description**.
@@ -78,10 +79,10 @@ Create a Microsoft Entra application for the API and give it the appropriate per
78
79
79
80
1. Go to your API Management instance.
80
81
81
-
1. Under **APIs** on the sidebar menu, select **Credential manager**, and then select **+ Create**.
82
+
1. Under **APIs** on the sidebar menu, select **Credential manager**, then select **+ Create**.
82
83
:::image type="content" source="media/credentials-how-to-azure-ad/create-credential.png" alt-text="Screenshot of creating an API credential in the portal.":::
83
84
84
-
1. On the **Create credential provider** page, enter the following settings, and select **Create**:
85
+
1. On **Create credential provider**, enter the following settings, and select **Create**:
85
86
86
87
|Settings |Value |
87
88
|---------|---------|
@@ -96,6 +97,7 @@ Create a Microsoft Entra application for the API and give it the appropriate per
96
97
|**Scopes**| Optional for Microsoft Entra identity provider. Automatically configured from Microsoft Entra app's API permissions. |
97
98
98
99
1. Select **Create**.
100
+
1. When prompted, review the OAuth redirect URL that's displayed, and select **Yes** to confirm that it matches the URL you entered in the app registration.
99
101
100
102
## Step 3: Configure a connection
101
103
@@ -167,7 +169,7 @@ On the **Connection** tab, complete the steps for your connection to the provide
167
169
168
170
The preceding policy definition consists of two parts:
169
171
170
-
* The [get-authorization-context](get-authorization-context-policy.md) policy fetches an authorization token by referencing the credential provider and connection that were created earlier.
172
+
* The [get-authorization-context](get-authorization-context-policy.md) policy fetches an authorization token by referencing the credential provider and connection that you created earlier.
171
173
* The [set-header](set-header-policy.md) policy creates an HTTP header with the fetched access token.
In this article, you learn how to create a managed [connection](credentials-overview.md) in API Management and call a GitHub API that requires an OAuth 2.0 token. The authorization code grant type is used in this example.
17
+
In this article, you learn how to create a managed [connection](credentials-overview.md) in API Management and call a GitHub API that requires an OAuth 2.0 token. This example uses the authorization code grant type.
18
18
19
19
You learn how to:
20
20
@@ -27,8 +27,8 @@ You learn how to:
27
27
28
28
## Prerequisites
29
29
30
-
* A GitHub account is required.
31
-
* A running API Management instance. If you need to, [create an Azure API Management instance](get-started-create-service-instance.md).
30
+
* A GitHub account.
31
+
* A running API Management instance. If you need one, [create an Azure API Management instance](get-started-create-service-instance.md).
32
32
* Enable a [system-assigned managed identity](api-management-howto-use-managed-service-identity.md) for API Management in the API Management instance.
33
33
34
34
## Step 1: Register an application in GitHub
@@ -41,20 +41,21 @@ Create a GitHub OAuth app for the API and give it the appropriate permissions fo
41
41
:::image type="content" source="media/credentials-how-to-github/register-application.png" alt-text="Screenshot of registering a new OAuth application in GitHub.":::
42
42
1. Enter an **Application name** and **Homepage URL** for the application. For this example, you can supply a placeholder URL such as `http://localhost`.
43
43
1. Optionally, add an **Application description**.
44
-
1. In **Authorization callback URL** (the redirect URL), enter `https://authorization-manager.consent.azure-apim.net/redirect/apim/<YOUR-APIM-SERVICENAME>`, substituting the name of the API Management instance where you will configure the credential provider.
44
+
1. In **Authorization callback URL** (the redirect URL), enter `https://authorization-manager.consent.azure-apim.net/redirect/apim/<YOUR-APIM-SERVICENAME>`, substituting the name of the API Management instance where you configure the credential provider.
45
+
1. Optionally select **Enable device flow** (not required for this example).
45
46
1. Select **Register application**.
46
-
1. On the **General** page, copy the **Client ID**, which you'll use in Step 2.
47
-
1. Select **Generate a new client secret**. Copy the secret, which won't be displayed again, and which you'll use in Step 2.
47
+
1. On the **General** page, copy the **Client ID**, which you use in Step 2.
48
+
1. Select **Generate a new client secret**. Copy the secret, which isn't displayed again. You configure the secret in Step 2.
48
49
49
50
:::image type="content" source="media/credentials-how-to-github/generate-secret.png" alt-text="Screenshot showing how to get client ID and client secret for the application in GitHub.":::
50
51
51
52
## Step 2: Configure a credential provider in API Management
52
53
53
-
1. Sign into the [Azure portal](https://portal.azure.com) and go to your API Management instance.
54
+
1. Sign in to the [Azure portal](https://portal.azure.com) and go to your API Management instance.
54
55
1. On the left menu, select **APIs** > **Credential manager** > **+ Create**.
55
56
56
57
:::image type="content" source="media/credentials-how-to-azure-ad/create-credential.png" alt-text="Screenshot of creating an API Management credential in the Azure portal.":::
57
-
1. On the **Create credential provider** page, enter the following settings:
58
+
1. On **Create credential provider**, enter the following settings:
58
59
59
60
|Settings |Value |
60
61
|---------|---------|
@@ -66,7 +67,7 @@ Create a GitHub OAuth app for the API and give it the appropriate permissions fo
66
67
|**Scope**| For this example, set the scope to *User*|
67
68
68
69
1. Select **Create**.
69
-
1. When prompted, review the OAuth redirect URL that's displayed, and select **Yes** to confirm that it matches the URL you entered in the app registration.
70
+
1. When prompted, review the OAuth redirect URL that's displayed, and select **Yes** to confirm that it matches the URL you entered in the GitHub app registration.
70
71
71
72
## Step 3: Configure a connection
72
73
@@ -82,7 +83,7 @@ On the **Connection** tab, complete the steps for your connection to the provide
82
83
83
84
## Step 4: Create an API in API Management and configure a policy
84
85
85
-
1. Sign into the [Azure portal](https://portal.azure.com) and go to your API Management instance.
86
+
1. Sign in to the [Azure portal](https://portal.azure.com) and go to your API Management instance.
86
87
1. On the left menu, select **APIs** > **APIs** > **+ Add API**.
87
88
1. Select **HTTP** and enter the following settings, then select **Create**.
88
89
@@ -92,7 +93,7 @@ On the **Connection** tab, complete the steps for your connection to the provide
92
93
|**Web service URL**|`https://api.github.com`|
93
94
|**API URL suffix**|*githubuser*|
94
95
95
-
1.Navigate to the newly created API and select **Add Operation**. Enter the following settings and select **Save**.
96
+
1.Go to the new API and select **Add Operation**. Enter the following settings and select **Save**.
96
97
97
98
|Setting |Value |
98
99
|---------|---------|
@@ -109,7 +110,7 @@ On the **Connection** tab, complete the steps for your connection to the provide
109
110
|**URL** for GET | /user/followers |
110
111
111
112
1. Select **All operations**. In the **Inbound processing** section, select the (**</>**) (code editor) icon.
112
-
1. Copy and paste the following in the policy editor. Make sure the `provider-id` and `authorization-id` values in the `get-authorization-context` policy correspond to the names of the credential provider and connection, respectively, that you configured in the preceding steps. Select **Save**.
113
+
1. Copy and paste the following code in the policy editor. Make sure the `provider-id` and `authorization-id` values in the `get-authorization-context` policy correspond to the names of the credential provider and connection, respectively, that you configured in the preceding steps. Select **Save**.
0 commit comments