Skip to content

Commit c1d6073

Browse files
authored
Merge pull request #220908 from MicrosoftDocs/main
12/08 AM Publish
2 parents 488f383 + b5b57fe commit c1d6073

File tree

154 files changed

+1410
-1007
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+1410
-1007
lines changed

.openpublishing.publish.config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,7 @@
950950
"articles/iot-accelerators/.openpublishing.redirection.iot-accelerators.json",
951951
"articles/iot-develop/.openpublishing.redirection.iot-develop.json",
952952
"articles/iot-edge/.openpublishing.redirection.iot-edge.json",
953+
"articles/iot-fundamentals/.openpublishing.redirection.iot-fundamentals.json",
953954
"articles/mariadb/.openpublishing.redirection.mariadb.json",
954955
"articles/marketplace/.openpublishing.redirection.marketplace.json",
955956
"articles/mysql/.openpublishing.redirection.mysql.json",

articles/active-directory/develop/scenario-web-api-call-api-app-configuration.md

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,19 @@ description: Learn how to build a web API that calls web APIs (app's code config
44
services: active-directory
55
author: jmprieur
66
manager: CelesteDG
7-
87
ms.service: active-directory
98
ms.subservice: develop
109
ms.topic: conceptual
1110
ms.workload: identity
12-
ms.date: 09/26/2020
11+
ms.date: 08/12/2022
1312
ms.author: jmprieur
1413
ms.custom: aaddev
1514
#Customer intent: As an application developer, I want to know how to write a web API that calls web APIs by using the Microsoft identity platform.
1615
---
1716

1817
# A web API that calls web APIs: Code configuration
1918

20-
After you've registered your web API, you can configure the code for the application.
21-
22-
The code that you use to configure your web API so that it calls downstream web APIs builds on top of the code that's used to protect a web API. For more information, see [Protected web API: App configuration](scenario-protected-web-api-app-configuration.md).
19+
Once registration for a Web API is complete, the application code can be configured. Configuring a web API to call a downstream web API builds on the code that's used in protecting a web API. For more information, see [Protected web API: App configuration](scenario-protected-web-api-app-configuration.md).
2320

2421
# [ASP.NET Core](#tab/aspnetcore)
2522

@@ -29,22 +26,21 @@ Microsoft recommends that you use the [Microsoft.Identity.Web](https://www.nuget
2926

3027
## Client secrets or client certificates
3128

32-
Given that your web API now calls a downstream web API, provide a client secret or client certificate in the *appsettings.json* file. You can also add a section that specifies:
29+
Given that the web API now calls a downstream web API, a client secret or client certificate in *appsettings.json* can be used for authentication. A section can be added to specify:
3330

3431
- The URL of the downstream web API
3532
- The scopes required for calling the API
3633

3734
In the following example, the `GraphBeta` section specifies these settings.
3835

39-
```JSON
36+
```json
4037
{
4138
"AzureAd": {
4239
"Instance": "https://login.microsoftonline.com/",
43-
"ClientId": "[Client_id-of-web-api-eg-2ec40e65-ba09-4853-bcde-bcb60029e596]",
40+
"ClientId": "Enter_the_Application_(client)_ID_here",
4441
"TenantId": "common",
45-
46-
// To call an API
47-
"ClientSecret": "[Copy the client secret added to the app from the Azure portal]",
42+
43+
"ClientSecret": "Enter_the_Application_Client_Secret_Value_here",
4844
"ClientCertificates": []
4945
},
5046
"GraphBeta": {
@@ -54,16 +50,15 @@ In the following example, the `GraphBeta` section specifies these settings.
5450
}
5551
```
5652

57-
Instead of a client secret, you can provide a client certificate. The following code snippet shows using a certificate stored in Azure Key Vault.
53+
Instead of a client secret, a client certificate can be provided. The following code snippet demonstrates a certificate stored in Azure Key Vault.
5854

59-
```JSON
55+
```json
6056
{
6157
"AzureAd": {
6258
"Instance": "https://login.microsoftonline.com/",
63-
"ClientId": "[Client_id-of-web-api-eg-2ec40e65-ba09-4853-bcde-bcb60029e596]",
59+
"ClientId": "Enter_the_Application_(client)_ID_here",
6460
"TenantId": "common",
6561

66-
// To call an API
6762
"ClientCertificates": [
6863
{
6964
"SourceType": "KeyVault",
@@ -79,11 +74,13 @@ Instead of a client secret, you can provide a client certificate. The following
7974
}
8075
```
8176

82-
Microsoft.Identity.Web provides several ways to describe certificates, both by configuration or by code. For details, see [Microsoft.Identity.Web wiki - Using certificates](https://github.com/AzureAD/microsoft-identity-web/wiki/Using-certificates) on GitHub.
77+
*Microsoft.Identity.Web* provides several ways to describe certificates, both by configuration or by code. For details, see [Microsoft.Identity.Web wiki - Using certificates](https://github.com/AzureAD/microsoft-identity-web/wiki/Using-certificates).
8378

8479
## Program.cs
8580

86-
Your web API will need to acquire a token for the downstream API. You specify it by adding the `.EnableTokenAcquisitionToCallDownstreamApi()` line after `.AddMicrosoftIdentityWebApi(Configuration)`. This line exposes the `ITokenAcquisition` service, that you can use in your controller/pages actions. However, as you'll see in the next two bullet points, you can do even simpler. You'll also need to choose a token cache implementation, for example `.AddInMemoryTokenCaches()`, in *Program.cs*. If you use ASP.NET Core 3.1 or 5.0 the code will be similar but in the *Startup.cs* file.
81+
A web API will need to acquire a token for the downstream API. Specify it by adding the `.EnableTokenAcquisitionToCallDownstreamApi()` line after `.AddMicrosoftIdentityWebApi(Configuration)`. This line exposes the `ITokenAcquisition` service that can be used in the controller/pages actions.
82+
83+
However, an alternative method is to implement a token cache. For example, adding `.AddInMemoryTokenCaches()`, to *Program.cs* will allow the token to be cached in memory.
8784

8885
```csharp
8986
using Microsoft.Identity.Web;
@@ -96,14 +93,14 @@ builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
9693
// ...
9794
```
9895

99-
If you don't want to acquire the token yourself, *Microsoft.Identity.Web* provides two mechanisms for calling a downstream web API from another API. The option you choose depends on whether you want to call Microsoft Graph or another API.
96+
*Microsoft.Identity.Web* provides two mechanisms for calling a downstream web API from another API. The option you choose depends on whether you want to call Microsoft Graph or another API.
10097

10198
### Option 1: Call Microsoft Graph
10299

103-
If you want to call Microsoft Graph, Microsoft.Identity.Web enables you to directly use the `GraphServiceClient` (exposed by the Microsoft Graph SDK) in your API actions. To expose Microsoft Graph:
100+
To call Microsoft Graph, *Microsoft.Identity.Web* enables you to directly use the `GraphServiceClient` (exposed by the Microsoft Graph SDK) in the API actions. To expose Microsoft Graph:
104101

105-
1. Add the [Microsoft.Identity.Web.MicrosoftGraph](https://www.nuget.org/packages/Microsoft.Identity.Web.MicrosoftGraph) NuGet package to your project.
106-
1. Add `.AddMicrosoftGraph()` after `.EnableTokenAcquisitionToCallDownstreamApi()` in the *Program.cs* file. `.AddMicrosoftGraph()` has several overrides. Using the override that takes a configuration section as a parameter, the code becomes:
102+
1. Add the [Microsoft.Identity.Web.MicrosoftGraph](https://www.nuget.org/packages/Microsoft.Identity.Web.MicrosoftGraph) NuGet package to the project.
103+
1. Add `.AddMicrosoftGraph()` after `.EnableTokenAcquisitionToCallDownstreamApi()` in *Program.cs*. `.AddMicrosoftGraph()` has several overrides. Using the override that takes a configuration section as a parameter, the code becomes:
107104

108105
```csharp
109106
using Microsoft.Identity.Web;
@@ -119,7 +116,7 @@ builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
119116

120117
### Option 2: Call a downstream web API other than Microsoft Graph
121118

122-
To call a downstream API other than Microsoft Graph, *Microsoft.Identity.Web* provides `.AddDownstreamWebApi()`, which requests tokens and calls the downstream web API.
119+
To call a downstream API other than Microsoft Graph, *Microsoft.Identity.Web* provides `.AddDownstreamWebApi()`, which requests tokens for the downstream API on behalf of the user.
123120

124121
```csharp
125122
using Microsoft.Identity.Web;
@@ -133,9 +130,9 @@ builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
133130
// ...
134131
```
135132

136-
As with web apps, you can choose various token cache implementations. For details, see [Microsoft identity web - Token cache serialization](https://aka.ms/ms-id-web/token-cache-serialization) on GitHub.
137-
138-
The following image shows the various possibilities of *Microsoft.Identity.Web* and their impact on the *Program.cs* file:
133+
Similar to web apps, various token cache implementations can be chosen. For details, see [Microsoft identity web - Token cache serialization](https://aka.ms/ms-id-web/token-cache-serialization) on GitHub.
134+
135+
The following image shows the possibilities of *Microsoft.Identity.Web* and the impact on *Program.cs*:
139136

140137
:::image type="content" source="media/scenarios/microsoft-identity-web-startup-cs.svg" alt-text="Block diagram showing service configuration options in startup dot C S for calling a web API and specifying a token cache implementation":::
141138

@@ -230,4 +227,4 @@ For more information about the OBO protocol, see the [Microsoft identity platfor
230227
## Next steps
231228

232229
Move on to the next article in this scenario,
233-
[Acquire a token for the app](scenario-web-api-call-api-acquire-token.md).
230+
[Acquire a token for the app](scenario-web-api-call-api-acquire-token.md).

articles/aks/TOC.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,16 +366,16 @@
366366
href: configure-kubenet.md
367367
- name: Use kubenet with dual-stack networking
368368
href: configure-kubenet-dual-stack.md
369-
- name: Use Azure-CNI
370-
href: configure-azure-cni.md
371-
- name: Use Azure-CNI Overlay (Preview)
372-
href: azure-cni-overlay.md
373369
- name: CNI
374370
items:
375371
- name: Bring your own CNI
376372
href: use-byo-cni.md
377373
- name: Use Azure CNI Powered by Cilium (Preview)
378374
href: azure-cni-powered-by-cilium.md
375+
- name: Use Azure-CNI
376+
href: configure-azure-cni.md
377+
- name: Use Azure-CNI Overlay (Preview)
378+
href: azure-cni-overlay.md
379379
- name: DNS
380380
items:
381381
- name: Use a static IP address and DNS label

articles/aks/dapr-migration.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ ms.custom: devx-track-azurecli
1212

1313
# Migrate from Dapr OSS to the Dapr extension for Azure Kubernetes Service (AKS)
1414

15-
You've installed and configured Dapr OSS on your Kubernetes cluster and want to migrate to the Dapr extension on AKS. In this guide, you'll learn how Dapr moves your managed clusters from using Dapr OSS to the Dapr extension by either:
15+
You've installed and configured Dapr OSS (using Dapr CLI or Helm) on your Kubernetes cluster, and want to start using the Dapr extension on AKS. In this guide, you'll learn how the Dapr extension for AKS can use the Kubernetes resources created by Dapr OSS and start managing them, by either:
1616

17-
- Checking for an existing Dapr installation via CLI prompts (default method), or
18-
- Using the Helm release name and namespace configuration settings to manually check for an existing Dapr installation.
19-
20-
This check allows the Dapr extension to reuse the already existing Kubernetes resources from your previous installation and start managing them.
17+
- Checking for an existing Dapr installation via Azure CLI prompts (default method), or
18+
- Using the release name and namespace from `--configuration-settings` to explicitly point to an existing Dapr installation.
2119

2220
## Check for an existing Dapr installation
2321

@@ -40,11 +38,11 @@ Enter the Helm release name for Dapr, or press Enter to use the default name [da
4038
Enter the namespace where Dapr is installed, or press Enter to use the default namespace [dapr-system]:
4139
```
4240

43-
## Configure the Dapr check using `--configuration-settings`
41+
## Configuring the existing Dapr installation using `--configuration-settings`
4442

4543
Alternatively, when creating the Dapr extension, you can configure the above settings via `--configuration-settings`. This method is useful when you are automating the installation via bash scripts, CI pipelines, etc.
4644

47-
If you don't have Dapr already installed on your cluster, set `skipExistingDaprCheck` to `true`:
45+
If you don't have an existing Dapr installation on your cluster, set `skipExistingDaprCheck` to `true`:
4846

4947
```azurecli-interactive
5048
az k8s-extension create --cluster-type managedClusters \
@@ -98,7 +96,7 @@ For more information, see [Dapr Production Guidelines][dapr-prod-guidelines].
9896

9997
## Next steps
10098

101-
Learn more about [the cluster extension][dapr-overview] and [how to use it][dapr-howto].
99+
Learn more about [Dapr][dapr-overview] and [how to use it][dapr-howto].
102100

103101

104102
<!-- LINKS INTERNAL -->

articles/automation/troubleshoot/update-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ Use the following procedure if your subscription is configured for the Automatio
280280

281281
2. Check [Update Management history](../update-management/deploy-updates.md#view-results-of-a-completed-update-deployment) to determine the exact time when the update deployment was run.
282282

283-
3. For machines that you suspect to have been missed by Update Management, use Azure Resource Graph (ARG) to [locate machine changes](../../governance/resource-graph/how-to/get-resource-changes.md#find-detected-change-events-and-view-change-details).
283+
3. For machines that you suspect to have been missed by Update Management, use Azure Resource Graph (ARG) to [locate machine changes](../../governance/resource-graph/how-to/get-resource-changes.md).
284284

285285
4. Search for changes over a considerable period, such as one day, before the update deployment was run.
286286

articles/azure-arc/kubernetes/azure-rbac.md

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ A conceptual overview of this feature is available in the [Azure RBAC on Azure A
3434
- [Upgrade your agents](agent-upgrade.md#manually-upgrade-agents) to the latest version.
3535
3636
> [!NOTE]
37-
> You can't set up this feature for managed Kubernetes offerings of cloud providers like Elastic Kubernetes Service or Google Kubernetes Engine where the user doesn't have access to the API server of the cluster. For Azure Kubernetes Service (AKS) clusters, this [feature is available natively](../../aks/manage-azure-rbac.md) and doesn't require the AKS cluster to be connected to Azure Arc. This feature isn't supported on AKS on Azure Stack HCI.
37+
> You can't set up this feature for managed Kubernetes offerings of cloud providers like Elastic Kubernetes Service or Google Kubernetes Engine where the user doesn't have access to the API server of the cluster. For Azure Kubernetes Service (AKS) clusters, this [feature is available natively](../../aks/manage-azure-rbac.md) and doesn't require the AKS cluster to be connected to Azure Arc. For AKS on Azure Stack HCI, see [Use Azure RBAC for AKS hybrid clusters (preview)](/azure/aks/hybrid/azure-rbac-aks-hybrid).
3838
3939
## Set up Azure AD applications
4040
@@ -44,32 +44,32 @@ A conceptual overview of this feature is available in the [Azure RBAC on Azure A
4444
4545
1. Create a new Azure AD application and get its `appId` value. This value is used in later steps as `serverApplicationId`.
4646
47-
```azurecli
48-
CLUSTER_NAME="<clusterName>"
49-
TENANT_ID="<tenant>"
50-
SERVER_UNIQUE_SUFFIX="<identifier_suffix>"
51-
SERVER_APP_ID=$(az ad app create --display-name "${CLUSTER_NAME}Server" --identifier-uris "api://${TENANT_ID}/${SERVER_UNIQUE_SUFFIX}" --query appId -o tsv)
52-
echo $SERVER_APP_ID
53-
```
47+
```azurecli
48+
CLUSTER_NAME="<name-of-arc-connected-cluster>"
49+
TENANT_ID="<tenant>"
50+
SERVER_UNIQUE_SUFFIX="<identifier_suffix>"
51+
SERVER_APP_ID=$(az ad app create --display-name "${CLUSTER_NAME}Server" --identifier-uris "api://${TENANT_ID}/${SERVER_UNIQUE_SUFFIX}" --query appId -o tsv)
52+
echo $SERVER_APP_ID
53+
```
5454
5555
1. To grant "Sign in and read user profile" API permissions to the server application. Copy this JSON and save it in a file called oauth2-permissions.json:
5656
57-
```json
58-
{
59-
"oauth2PermissionScopes": [
60-
{
61-
"adminConsentDescription": "Sign in and read user profile",
62-
"adminConsentDisplayName": "Sign in and read user profile",
63-
"id": "<unique_guid>",
64-
"isEnabled": true,
65-
"type": "User",
66-
"userConsentDescription": "Sign in and read user profile",
67-
"userConsentDisplayName": "Sign in and read user profile",
68-
"value": "User.Read"
69-
}
70-
]
71-
}
72-
```
57+
```json
58+
{
59+
"oauth2PermissionScopes": [
60+
{
61+
"adminConsentDescription": "Sign in and read user profile",
62+
"adminConsentDisplayName": "Sign in and read user profile",
63+
"id": "<paste_the_SERVER_APP_ID>",
64+
"isEnabled": true,
65+
"type": "User",
66+
"userConsentDescription": "Sign in and read user profile",
67+
"userConsentDisplayName": "Sign in and read user profile",
68+
"value": "User.Read"
69+
}
70+
]
71+
}
72+
```
7373
7474
1. Update the application's group membership claims. Run the commands in the same directory as `oauth2-permissions.json` file. RBAC for Azure Arc-enabled Kubernetes requires [`signInAudience` to be set to **AzureADMyOrg**](../../active-directory/develop/supported-accounts-validation.md):
7575
@@ -95,10 +95,10 @@ A conceptual overview of this feature is available in the [Azure RBAC on Azure A
9595
az ad app permission grant --id "${SERVER_APP_ID}" --api 00000003-0000-0000-c000-000000000000 --scope User.Read
9696
```
9797

98-
> [!NOTE]
99-
> An Azure tenant administrator has to run this step.
100-
>
101-
> For usage of this feature in production, we recommend that you create a different server application for every cluster.
98+
> [!NOTE]
99+
> An Azure [application administrator](../../active-directory/roles/permissions-reference.md#application-administrator) has to run this step.
100+
>
101+
> For usage of this feature in production, we recommend that you create a different server application for every cluster.
102102
103103
#### Create a client application
104104

@@ -139,13 +139,13 @@ A conceptual overview of this feature is available in the [Azure RBAC on Azure A
139139
140140
1. Create a new Azure AD application and get its `appId` value. This value is used in later steps as `serverApplicationId`.
141141
142-
```azurecli
143-
CLUSTER_NAME="<clusterName>"
144-
TENANT_ID="<tenant>"
145-
SERVER_UNIQUE_SUFFIX="<identifier_suffix>"
146-
SERVER_APP_ID=$(az ad app create --display-name "${CLUSTER_NAME}Server" --identifier-uris "api://${TENANT_ID}/${SERVER_UNIQUE_SUFFIX}" --query appId -o tsv)
147-
echo $SERVER_APP_ID
148-
```
142+
```azurecli
143+
CLUSTER_NAME="<name-of-arc-connected-cluster>"
144+
TENANT_ID="<tenant>"
145+
SERVER_UNIQUE_SUFFIX="<identifier_suffix>"
146+
SERVER_APP_ID=$(az ad app create --display-name "${CLUSTER_NAME}Server" --identifier-uris "api://${TENANT_ID}/${SERVER_UNIQUE_SUFFIX}" --query appId -o tsv)
147+
echo $SERVER_APP_ID
148+
```
149149
150150
1. Update the application's group membership claims:
151151
@@ -168,8 +168,8 @@ A conceptual overview of this feature is available in the [Azure RBAC on Azure A
168168
```
169169
170170
> [!NOTE]
171-
> An Azure tenant administrator has to run this step.
172-
>
171+
> An Azure [application administrator](../../active-directory/roles/permissions-reference.md#application-administrator) has to run this step.
172+
>
173173
> For usage of this feature in production, we recommend that you create a different server application for every cluster.
174174
175175
#### Create a client application

articles/azure-arc/kubernetes/quickstart-connect-cluster.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ For a conceptual look at connecting clusters to Azure Arc, see [Azure Arc-enable
146146
|`https://k8connecthelm.azureedge.net` | `az connectedk8s connect` uses Helm 3 to deploy Azure Arc agents on the Kubernetes cluster. This endpoint is needed for Helm client download to facilitate deployment of the agent helm chart. |
147147
|`guestnotificationservice.azure.com`, `*.guestnotificationservice.azure.com`, `sts.windows.net`, `https://k8sconnectcsp.azureedge.net` | For [Cluster Connect](cluster-connect.md) and for [Custom Location](custom-locations.md) based scenarios. |
148148
|`*.servicebus.windows.net` | For [Cluster Connect](cluster-connect.md) and for [Custom Location](custom-locations.md) based scenarios. |
149+
|`https://graph.microsoft.com/` | Required when [Azure RBAC](azure-rbac.md) is configured |
149150
150151
> [!NOTE]
151152
> To translate the `*.servicebus.windows.net` wildcard into specific endpoints, use the command `\GET https://guestnotificationservice.azure.com/urls/allowlist?api-version=2020-01-01&location=<location>`. Within this command, the region must be specified for the `<location>` placeholder.

0 commit comments

Comments
 (0)