Skip to content

Commit 3b66244

Browse files
authored
Merge pull request #309002 from dlepow/credmgr
[APIM] Freshness: Cred mgr articles
2 parents e5dc217 + 3a67964 commit 3b66244

5 files changed

Lines changed: 74 additions & 58 deletions

articles/api-management/credentials-configure-common-providers.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: api-management
55
author: dlepow
66
ms.service: azure-api-management
77
ms.topic: how-to
8-
ms.date: 10/03/2025
8+
ms.date: 12/05/2025
99
ms.author: danlep
1010
ms.custom: sfi-image-nochange
1111
# 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
8080

8181
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.
8282

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+
8387
## Related content
8488

8589
* 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).

articles/api-management/credentials-how-to-azure-ad.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: api-management
55
author: dlepow
66
ms.service: azure-api-management
77
ms.topic: how-to
8-
ms.date: 10/01/2025
8+
ms.date: 12/08/2025
99
ms.author: danlep
1010
ms.custom: sfi-image-nochange
1111
---
@@ -14,7 +14,7 @@ ms.custom: sfi-image-nochange
1414

1515
[!INCLUDE [api-management-availability-all-tiers](../../includes/api-management-availability-all-tiers.md)]
1616

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. 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.
1818

1919
You learn how to:
2020

@@ -45,28 +45,29 @@ Create a Microsoft Entra application for the API and give it the appropriate per
4545

4646
1. Search for and select **Microsoft Entra ID**.
4747

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**.
4949

50-
1. On the **Register an application** page, enter your application registration settings:
50+
1. On **Register an application**, enter your application registration settings:
5151
1. In **Name**, enter a meaningful name for the app, such as *MicrosoftGraphAuth*.
5252
1. In **Supported account types**, select an option that suits your scenario, for example, **Accounts in this organizational directory only (Single tenant)**.
5353
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.
5454
1. Select **Register**.
5555

5656
:::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.":::
5757

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**.
5962
:::image type="content" source="./media/credentials-how-to-azure-ad/add-permission.png" alt-text="Screenshot of adding an API permission in the portal.":::
6063

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**.
6566
1. Next, select **Grant admin consent for Default Directory**. The status of the permissions changes to **Granted for Default Directory**.
6667

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.
6869

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**.
7071
:::image type="content" source="media/credentials-how-to-azure-ad/create-secret.png" alt-text="Screenshot of creating an app secret in the portal.":::
7172

7273
1. Enter a **Description**.
@@ -78,10 +79,10 @@ Create a Microsoft Entra application for the API and give it the appropriate per
7879

7980
1. Go to your API Management instance.
8081

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**.
8283
:::image type="content" source="media/credentials-how-to-azure-ad/create-credential.png" alt-text="Screenshot of creating an API credential in the portal.":::
8384

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**:
8586

8687
|Settings |Value |
8788
|---------|---------|
@@ -96,6 +97,7 @@ Create a Microsoft Entra application for the API and give it the appropriate per
9697
|**Scopes** | Optional for Microsoft Entra identity provider. Automatically configured from Microsoft Entra app's API permissions. |
9798

9899
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.
99101

100102
## Step 3: Configure a connection
101103

@@ -167,7 +169,7 @@ On the **Connection** tab, complete the steps for your connection to the provide
167169

168170
The preceding policy definition consists of two parts:
169171

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.
171173
* The [set-header](set-header-policy.md) policy creates an HTTP header with the fetched access token.
172174

173175
## Step 5: Test the API

articles/api-management/credentials-how-to-github.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: api-management
55
author: dlepow
66
ms.service: azure-api-management
77
ms.topic: how-to
8-
ms.date: 10/02/2025
8+
ms.date: 12/08/2025
99
ms.author: danlep
1010
ms.custom: sfi-image-nochange
1111
---
@@ -14,7 +14,7 @@ ms.custom: sfi-image-nochange
1414

1515
[!INCLUDE [api-management-availability-all-tiers](../../includes/api-management-availability-all-tiers.md)]
1616

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. 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.
1818

1919
You learn how to:
2020

@@ -27,8 +27,8 @@ You learn how to:
2727
2828
## Prerequisites
2929

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).
3232
* Enable a [system-assigned managed identity](api-management-howto-use-managed-service-identity.md) for API Management in the API Management instance.
3333

3434
## 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
4141
:::image type="content" source="media/credentials-how-to-github/register-application.png" alt-text="Screenshot of registering a new OAuth application in GitHub.":::
4242
1. Enter an **Application name** and **Homepage URL** for the application. For this example, you can supply a placeholder URL such as `http://localhost`.
4343
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).
4546
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.
4849

4950
:::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.":::
5051

5152
## Step 2: Configure a credential provider in API Management
5253

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.
5455
1. On the left menu, select **APIs** > **Credential manager** > **+ Create**.
5556

5657
:::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:
5859

5960
|Settings |Value |
6061
|---------|---------|
@@ -66,7 +67,7 @@ Create a GitHub OAuth app for the API and give it the appropriate permissions fo
6667
|**Scope** | For this example, set the scope to *User* |
6768

6869
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.
7071

7172
## Step 3: Configure a connection
7273

@@ -82,7 +83,7 @@ On the **Connection** tab, complete the steps for your connection to the provide
8283
8384
## Step 4: Create an API in API Management and configure a policy
8485

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.
8687
1. On the left menu, select **APIs** > **APIs** > **+ Add API**.
8788
1. Select **HTTP** and enter the following settings, then select **Create**.
8889

@@ -92,7 +93,7 @@ On the **Connection** tab, complete the steps for your connection to the provide
9293
|**Web service URL** | `https://api.github.com` |
9394
|**API URL suffix** | *githubuser* |
9495

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**.
9697

9798
|Setting |Value |
9899
|---------|---------|
@@ -109,7 +110,7 @@ On the **Connection** tab, complete the steps for your connection to the provide
109110
|**URL** for GET | /user/followers |
110111

111112
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**.
113114

114115
```xml
115116
<policies>

0 commit comments

Comments
 (0)