Skip to content

Commit b48d829

Browse files
authored
Merge pull request #188091 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/azure-docs (branch main)
2 parents 41ff96b + fcf7ca4 commit b48d829

File tree

10 files changed

+59
-45
lines changed

10 files changed

+59
-45
lines changed

articles/active-directory/develop/howto-add-app-roles-in-azure-ad-apps.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,12 @@ Because these are _application permissions_, not delegated permissions, an admin
173173

174174
The **Status** column should reflect that consent has been **Granted for \<tenant name\>**.
175175

176-
## Use app roles in your web API
176+
<a name="use-app-roles-in-your-web-api"></a>
177+
## Usage scenario of app roles
177178

178-
Once you've defined app roles and assigned them to a user, group, or application, your next step is to add code to your web API that checks for those roles when the API is called. That is, when a client app requests an API operation you've decided requires authorization, your API's code must verify the scopes are in the access token presented in the client app's call.
179+
If you're implementing app role business logic that signs in the users in your application scenario, first define the app roles in **App registration**. Then, an admin assigns them to users and groups in the **Enterprise applications** pane. These assigned app roles are included with any token that's issued for your application, either access tokens when your app is the API being called by an app or ID tokens when your app is signing in a user.
180+
181+
If you're implementing app role business logic in an app-calling-API scenario, you have two app registrations. One app registration is for the app, and a second app registration is for the API. In this case, define the app roles and assign them to the user or group in the app registration of the API. When the user authenticates with the app and requests an access token to call the API, a roles claim is included in the access token. Your next step is to add code to your web API to check for those roles when the API is called.
179182

180183
To learn how to add authorization to your web API, see [Protected web API: Verify scopes and app roles](scenario-protected-web-api-verification-scope-app-roles.md).
181184

articles/active-directory/develop/scenario-desktop-acquire-token-wam.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ Using an authentication broker such as WAM has numerous benefits.
4040

4141
## WAM limitations
4242

43-
- B2C authorities are not supported.
44-
- Available on Win10, Win Server 2016, Win Server 2019. On Mac, Linux and earlier Windows, MSAL will fallback to a browser.
43+
- B2C and ADFS authorities are not supported. MSAL will fallback to a browser.
44+
- Available on Win10+ and Win Server 2019+. On Mac, Linux and earlier Windows MSAL will fallback to a browser.
45+
- Not available on Xbox.
4546

4647
## WAM calling pattern
4748

articles/active-directory/develop/scenario-protected-web-api-verification-scope-app-roles.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ms.custom: aaddev
2020

2121
This article describes how you can add authorization to your web API. This protection ensures that the API is called only by:
2222

23-
- Applications on behalf of users who have the right scopes.
23+
- Applications on behalf of users who have the right scopes and roles.
2424
- Daemon apps that have the right application roles.
2525

2626
The code snippets in this article are extracted from the following code samples on GitHub:
@@ -277,29 +277,20 @@ public class TodoListController : ApiController
277277
}
278278
```
279279

280-
Instead, you can use the [Authorize(Roles = "role")] attributes on the controller or an action (or a razor page).
280+
281+
Instead, you can use the [Authorize(Roles = "access_as_application")] attributes on the controller or an action (or a razor page).
281282

282283
```CSharp
283-
[Authorize(Roles = "role")]
284+
[Authorize(Roles = "access_as_application")]
284285
MyController : ApiController
285286
{
286287
// ...
287288
}
288289
```
289290

290-
But for this, you'll need to map the Role claim to "roles" in the Startup.cs file:
291-
292-
```CSharp
293-
services.Configure<OpenIdConnectOptions>(OpenIdConnectDefaults.AuthenticationScheme, options =>
294-
{
295-
// The claim in the Jwt token where App roles are available.
296-
options.TokenValidationParameters.RoleClaimType = "roles";
297-
});
298-
```
299-
300-
This isn't the best solution if you also need to do authorization based on groups.
291+
[Role-based authorization in ASP.NET Core](/aspnet/core/security/authorization/roles) lists several approaches to implement role based authorization. Developers can choose one among them which suits to their respective scenarios.
301292

302-
For details, see the web app incremental tutorial on [authorization by roles and groups](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/5-WebApp-AuthZ).
293+
For working samples, see the web app incremental tutorial on [authorization by roles and groups](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/5-WebApp-AuthZ).
303294

304295
### [ASP.NET Classic](#tab/aspnet)
305296

@@ -340,9 +331,13 @@ For a full version of `ValidateAppRole` for ASP.NET Core, see [_RolesRequiredHtt
340331
341332
---
342333

343-
### Accepting app-only tokens if the web API should be called only by daemon apps
334+
### Verify app roles in APIs called on behalf of users
335+
336+
Users can also use roles claims in user assignment patterns, as shown in [How to add app roles in your application and receive them in the token](howto-add-app-roles-in-azure-ad-apps.md). If the roles are assignable to both, checking roles will let apps sign in as users and users sign in as apps. We recommend that you declare different roles for users and apps to prevent this confusion.
344337

345-
Users can also use roles claims in user assignment patterns, as shown in [How to: Add app roles in your application and receive them in the token](howto-add-app-roles-in-azure-ad-apps.md). If the roles are assignable to both, checking roles will let apps sign in as users and users to sign in as apps. We recommend that you declare different roles for users and apps to prevent this confusion.
338+
If you have defined app roles with user/group, then roles claim can also be verified in the API along with scopes. The verification logic of the app roles in this scenario remains same as if API is called by the daemon apps since there is no differentiation in the role claim for user/group and application.
339+
340+
### Accepting app-only tokens if the web API should be called only by daemon apps
346341

347342
If you want only daemon apps to call your web API, add the condition that the token is an app-only token when you validate the app role.
348343

articles/aks/gpu-multi-instance.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,17 +164,17 @@ Use the `kubectl` run command to schedule work using single strategy:
164164
kubectl run -it --rm \
165165
--image=nvidia/cuda:11.0-base \
166166
--restart=Never \
167-
--limits=nvidia.com/mig-1g.5gb=1 \
168-
mixed-strategy-example -- nvidia-smi -L
167+
--limits=nvidia.com/gpu=1 \
168+
single-strategy-example -- nvidia-smi -L
169169
```
170170

171171
Use the `kubectl` run command to schedule work using mixed strategy:
172172
```
173173
kubectl run -it --rm \
174174
--image=nvidia/cuda:11.0-base \
175175
--restart=Never \
176-
--limits=nvidia.com/gpu=1 \
177-
single-strategy-example -- nvidia-smi -L
176+
--limits=nvidia.com/mig-1g.5gb=1 \
177+
mixed-strategy-example -- nvidia-smi -L
178178
```
179179

180180

articles/cognitive-services/Translator/custom-translator/overview.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ Custom Translator supports more than three dozen languages, and maps directly to
2121

2222
This documentation contains the following article types:
2323

24-
* [**Quickstarts**](quickstart-build-deploy-custom-model.md) are getting-started instructions to guide you through making requests to the service.
25-
* [**How-to guides**](how-to-create-project.md) contain instructions for using the feature in more specific or customized ways.
26-
* [**Concepts**](workspace-and-project.md) provide in-depth explanations of the feature functionality.
27-
24+
* [**Quickstarts**](./v2-preview/quickstart.md) are getting-started instructions to guide you through making requests to the service.
25+
* [**How-to guides**](./v2-preview/how-to/create-manage-workspace.md) contain instructions for using the feature in more specific or customized ways.
2826

2927
## Features
3028

@@ -33,10 +31,10 @@ Custom Translator provides different features to build custom translation system
3331
|Feature |Description |
3432
|---------|---------|
3533
|[Apply neural machine translation technology](https://www.microsoft.com/translator/blog/2016/11/15/microsoft-translator-launching-neural-network-based-translations-for-all-its-speech-languages/) | Improve your translation by applying neural machine translation (NMT) provided by Custom translator. |
36-
|[Build systems that knows your business terminology](what-are-parallel-documents.md) | Customize and build translation systems using parallel documents, that understand the terminologies used in your own business and industry. |
37-
|[Use a dictionary to build your models](what-is-dictionary.md) | If you don't have training data set, you can train a model with only dictionary data. |
38-
|[Collaborate with others](how-to-manage-settings.md#share-your-workspace) | Collaborate with your team by sharing your work with different people. |
39-
|[Access your custom translation model](../reference/v3-0-translate.md?tabs=curl) | Your custom translation model can be accessed anytime by your existing applications/ programs via Microsoft Translator Text API V3. |
34+
|[Build systems that knows your business terminology](./v2-preview/beginners-guide.md) | Customize and build translation systems using parallel documents, that understand the terminologies used in your own business and industry. |
35+
|[Use a dictionary to build your models](./v2-preview/how-to/train-custom-model.md#when-to-select-dictionary-only-training) | If you don't have training data set, you can train a model with only dictionary data. |
36+
|[Collaborate with others](./v2-preview/how-to/create-manage-workspace.md#manage-workspace-settings) | Collaborate with your team by sharing your work with different people. |
37+
|[Access your custom translation model](./v2-preview/how-to/translate-with-custom-model.md) | Your custom translation model can be accessed anytime by your existing applications/ programs via Microsoft Translator Text API V3. |
4038

4139
## Get better translations
4240

@@ -67,4 +65,4 @@ Custom systems can be seamlessly accessed and integrated into any product or bus
6765

6866
- Read about [pricing details](https://azure.microsoft.com/pricing/details/cognitive-services/translator-text-api/).
6967

70-
- With [Quickstart](quickstart-build-deploy-custom-model.md) learn to build a translation model in Custom Translator.
68+
- With [Quickstart](./v2-preview/quickstart.md) learn to build a translation model in Custom Translator.

articles/cognitive-services/Translator/reference/v3-0-reference.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ To force the request to be handled within a specific geography, use the desired
4040
<sup>1</sup> Customers with a resource located in Switzerland North or Switzerland West can ensure that their Text API requests are served within Switzerland. To ensure that requests are handled in Switzerland, create the Translator resource in the 'Resource region' 'Switzerland North' or 'Switzerland West', then use the resource's custom endpoint in your API requests. For example: If you create a Translator resource in Azure portal with 'Resource region' as 'Switzerland North' and your resource name is 'my-ch-n', then your custom endpoint is "https://my-ch-n.cognitiveservices.azure.com". And a sample request to translate is:
4141
```curl
4242
// Pass secret key and region using headers to a custom endpoint
43-
curl -X POST " my-ch-n.cognitiveservices.azure.com/translator/text/v3.0/translate?to=fr" \
43+
curl -X POST " my-ch-n.cognitiveservices.azure.com/translate?to=fr" \
4444
-H "Ocp-Apim-Subscription-Key: xxx" \
4545
-H "Ocp-Apim-Subscription-Region: switzerlandnorth" \
4646
-H "Content-Type: application/json" \
@@ -126,7 +126,7 @@ Alternatively, you can exchange your secret key for an access token. This token
126126
| Global | `https://api.cognitive.microsoft.com/sts/v1.0/issueToken` |
127127
| Regional or Multi-Service | `https://<your-region>.api.cognitive.microsoft.com/sts/v1.0/issueToken` |
128128

129-
Here are example requests to obtain a token given a secret key:
129+
Here are example requests to obtain a token given a secret key for a global resource:
130130

131131
```curl
132132
// Pass secret key using header
@@ -136,6 +136,16 @@ curl --header 'Ocp-Apim-Subscription-Key: <your-key>' --data "" 'https://api.cog
136136
curl --data "" 'https://api.cognitive.microsoft.com/sts/v1.0/issueToken?Subscription-Key=<your-key>'
137137
```
138138

139+
And here are example requests to obtain a token given a secret key for a regional resource located in Central US:
140+
141+
```curl
142+
// Pass secret key using header
143+
curl --header "Ocp-Apim-Subscription-Key: <your-key>" --data "" "https://centralus.api.cognitive.microsoft.com/sts/v1.0/issueToken"
144+
145+
// Pass secret key using query string parameter
146+
curl --data "" "https://centralus.api.cognitive.microsoft.com/sts/v1.0/issueToken?Subscription-Key=<your-key>"
147+
```
148+
139149
A successful request returns the encoded access token as plain text in the response body. The valid token is passed to the Translator service as a bearer token in the Authorization.
140150

141151
```http
@@ -173,7 +183,7 @@ An authentication token is valid for 10 minutes. The token should be reused when
173183
```curl
174184
// Using headers, pass a bearer token generated by Azure AD, resource ID, and the region.
175185
176-
curl -X POST "https://api.cognitive.microsofttranslator.com/translator/text/v3.0/translate?api-version=3.0&to=es" \
186+
curl -X POST "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=es" \
177187
-H "Authorization: Bearer <Base64-access_token>"\
178188
-H "Ocp-Apim-ResourceId: <Resource ID>" \
179189
-H "Ocp-Apim-Subscription-Region: <your-region>" \
@@ -186,7 +196,7 @@ curl -X POST "https://api.cognitive.microsofttranslator.com/translator/text/v3.0
186196
```curl
187197
// Using headers, pass a bearer token generated by Azure AD.
188198
189-
curl -X POST https://<your-custom-domain>.cognitiveservices.azure.com/translator/text/v3.0/translate?api-version=3.0&to=es \
199+
curl -X POST https://<your-custom-domain>.cognitiveservices.azure.com/translate?api-version=3.0&to=es \
190200
-H "Authorization: Bearer <Base64-access_token>"\
191201
-H "Content-Type: application/json" \
192202
-data-raw "[{'Text':'Hello, friend.'}]"
@@ -201,7 +211,7 @@ Translator v3.0 also supports authorizing access to managed identities. If a man
201211
```curl
202212
// Using headers, pass a bearer token generated either by Azure AD or Managed Identities, resource ID, and the region.
203213
204-
curl -X POST https://api.cognitive.microsofttranslator.com/translator/text/v3.0/translate?api-version=3.0&to=es \
214+
curl -X POST https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=es \
205215
-H "Authorization: Bearer <Base64-access_token>"\
206216
-H "Ocp-Apim-ResourceId: <Resource ID>" \
207217
-H "Ocp-Apim-Subscription-Region: <your-region>" \
@@ -214,7 +224,7 @@ curl -X POST https://api.cognitive.microsofttranslator.com/translator/text/v3.0/
214224
```curl
215225
//Using headers, pass a bearer token generated by Managed Identities.
216226
217-
curl -X POST https://<your-custom-domain>.cognitiveservices.azure.com/translator/text/v3.0/translate?api-version=3.0&to=es \
227+
curl -X POST https://<your-custom-domain>.cognitiveservices.azure.com/translate?api-version=3.0&to=es \
218228
-H "Authorization: Bearer <Base64-access_token>"\
219229
-H "Content-Type: application/json" \
220230
-data-raw "[{'Text':'Hello, friend.'}]"
@@ -237,7 +247,7 @@ Here's an example request to call the Translator using the custom endpoint
237247

238248
```curl
239249
// Pass secret key and region using headers
240-
curl -X POST "https://<your-custom-domain>.cognitiveservices.azure.com/translator/text/v3.0/translate?api-version=3.0&to=es" \
250+
curl -X POST "https://<your-custom-domain>.cognitiveservices.azure.com/translate?api-version=3.0&to=es" \
241251
-H "Ocp-Apim-Subscription-Key:<your-key>" \
242252
-H "Ocp-Apim-Subscription-Region:<your-region>" \
243253
-H "Content-Type: application/json" \

articles/confidential-ledger/quickstart-python.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ credential = DefaultAzureCredential()
9494
We'll finish setup by setting some variables for use in your application: the resource group (myResourceGroup), the name of ledger you want to create, and two urls to be used by the data plane client library.
9595

9696
> [!Important]
97-
> Each ledger must have a globally unique name. Replace \<your-unique-keyvault-name\> with the name of your ledger in the following example.
97+
> Each ledger must have a globally unique name. Replace \<your-unique-ledger-name\> with the name of your ledger in the following example.
9898
9999
```python
100100
resource_group = "myResourceGroup"

articles/storage/blobs/storage-how-to-mount-container-linux.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ To mount blobfuse, run the following command with your user. This command mounts
146146
sudo blobfuse ~/mycontainer --tmp-path=/mnt/resource/blobfusetmp --config-file=/path/to/fuse_connection.cfg -o attr_timeout=240 -o entry_timeout=240 -o negative_timeout=120
147147
```
148148

149+
> [!NOTE]
150+
> If you use an ADLS account, you must include `--use-adls=true`.
151+
149152
You should now have access to your block blobs through the regular file system APIs. The user who mounts the directory is the only person who can access it, by default, which secures the access. To allow access to all users, you can mount via the option `-o allow_other`.
150153

151154
```bash

articles/virtual-machines/spot-vms.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ms.reviewer: cynthn
1818

1919
Using Azure Spot Virtual Machines allows you to take advantage of our unused capacity at a significant cost savings. At any point in time when Azure needs the capacity back, the Azure infrastructure will evict Azure Spot Virtual Machines. Therefore, Azure Spot Virtual Machines are great for workloads that can handle interruptions like batch processing jobs, dev/test environments, large compute workloads, and more.
2020

21-
The amount of available capacity can vary based on size, region, time of day, and more. When deploying Azure Spot Virtual Machines, Azure will allocate the VMs if there is capacity available, but there is no SLA for these VMs. A Azure Spot Virtual Machine offers no high availability guarantees. At any point in time when Azure needs the capacity back, the Azure infrastructure will evict Azure Spot Virtual Machines with 30 seconds notice.
21+
The amount of available capacity can vary based on size, region, time of day, and more. When deploying Azure Spot Virtual Machines, Azure will allocate the VMs if there is capacity available, but there is no SLA for these VMs. An Azure Spot Virtual Machine offers no high availability guarantees. At any point in time when Azure needs the capacity back, the Azure infrastructure will evict Azure Spot Virtual Machines with 30 seconds notice.
2222

2323

2424
## Eviction policy
@@ -86,7 +86,7 @@ You can see historical pricing and eviction rates per size in a region in the po
8686

8787
## Frequently asked questions
8888

89-
**Q:** Once created, is a Azure Spot Virtual Machine the same as regular standard VM?
89+
**Q:** Once created, is an Azure Spot Virtual Machine the same as regular standard VM?
9090

9191
**A:** Yes, except there is no SLA for Azure Spot Virtual Machines and they can be evicted at any time.
9292

articles/virtual-network/nat-gateway/faq.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ sections:
9090
- question: Can I use Virtual Network NAT gateway with Azure Firewall?
9191
answer: |
9292
Yes. For more information about Virtual Network NAT integration with Azure Firewall, see [Scale SNAT ports with Azure NAT Gateway](../../firewall/integrate-with-nat-gateway.md).
93-
93+
94+
- question: Can I use Virtual Network NAT gateway with Virtual Network service endpoints?
95+
answer: |
96+
Yes. The addition of a Virtual Network NAT Gateway to a subnet with service endpoints does not affect the endpoints. [Virtual Network service endpoints](../virtual-network-service-endpoints-overview.md) enable a more specific route for the destination Azure service traffic they represent. Traffic for the service endpoint will continue to be routed toward the service and wont go via the NAT Gateway.
97+
9498
additionalContent: |
9599
96100
## Next steps

0 commit comments

Comments
 (0)