Skip to content

Commit f286165

Browse files
authored
Small changes
1 parent 180cb7c commit f286165

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ HttpResponseMessage response = await _httpClient.GetAsync(apiUri);
4949
```
5050

5151
> [!IMPORTANT]
52-
> A client application requests the bearer token to the Microsoft identity platform *for the web API*. The web API is the only application that should verify the token and view the claims it contains. Client apps should never try to inspect the claims in tokens.
52+
> A client application requests the bearer token to the Microsoft identity platform *for the web API*. The API is the only application that should verify the token and view the claims it contains. Client apps should never try to inspect the claims in tokens.
5353
>
5454
> In the future, the web API might require that the token be encrypted. This requirement would prevent access for client apps that can view access tokens.
5555
@@ -59,7 +59,7 @@ This section describes how to configure a bearer token.
5959

6060
### Config file
6161

62-
You need specify the TenantId only if you want to accept access tokens from a single tenant (line-of-business app). Otherwise, it can be left as `common`. The different values can be:
62+
You need specify the `TenantId` only if you want to accept access tokens from a single tenant (line-of-business app). Otherwise, it can be left as `common`. The different values can be:
6363
- A GUID (Tenant ID = Directory ID)
6464
- `common` can be any organization and personal accounts
6565
- `organizations` can be any organization
@@ -81,7 +81,7 @@ You need specify the TenantId only if you want to accept access tokens from a si
8181
}
8282
```
8383

84-
#### Case where you used a custom App ID URI for your web API
84+
#### Using a custom App ID URI for a web API
8585

8686
If you've accepted the default App ID URI proposed by the Azure portal, you don't need to specify the audience (see [Application ID URI and scopes](scenario-protected-web-api-app-registration.md#scopes-and-the-application-id-uri)). Otherwise, add an `Audience` property whose value is the App ID URI for your web API. This typically starts with `api://`.
8787

@@ -93,7 +93,6 @@ If you've accepted the default App ID URI proposed by the Azure portal, you don'
9393
"TenantId": "common",
9494
"Audience": "Enter_the_Application_ID_URI_here"
9595
},
96-
// more lines
9796
}
9897
```
9998

@@ -105,7 +104,7 @@ When an app is called on a controller action that holds an **[Authorize]** attri
105104

106105
Microsoft recommends you use the [Microsoft.Identity.Web](https://www.nuget.org/packages/Microsoft.Identity.Web) NuGet package when developing a web API with ASP.NET Core.
107106

108-
_Microsoft.Identity.Web_ provides the glue between ASP.NET Core, the authentication middleware, and the [Microsoft Authentication Library (MSAL)](msal-overview.md) for .NET. It allows for a clearer, more robust developer experience and leverages the power of the Microsoft identity platform and Azure AD B2C.
107+
*Microsoft.Identity.Web* provides the glue between ASP.NET Core, the authentication middleware, and the [Microsoft Authentication Library (MSAL)](msal-overview.md) for .NET. It allows for a clearer, more robust developer experience and leverages the power of the Microsoft identity platform and Azure AD B2C.
109108

110109
#### ASP.NET for .NET 6.0
111110

@@ -120,7 +119,7 @@ dotnet new webapi --auth SingleOrg
120119

121120
**Visual Studio** - To create a web API project in Visual Studio, select **File** > **New** > **Project** > **ASP.NET Core Web API**.
122121

123-
Both the .NET CLI and Visual Studio project templates create a _Program.cs_ file that looks similar this code snippet. Notice the `Microsoft.Identity.Web` using directive and the lines containing authentication and authorization.
122+
Both the .NET CLI and Visual Studio project templates create a *Program.cs* file that looks similar this code snippet. Notice `Microsoft.Identity.Web` using directive and the lines containing authentication and authorization.
124123

125124
```csharp
126125
using Microsoft.AspNetCore.Authentication;
@@ -186,7 +185,7 @@ This table describes the validators:
186185

187186
#### Customizing token validation
188187

189-
The validators are associated with properties of the **TokenValidationParameters** class. The properties are initialized from the ASP.NET and ASP.NET Core configuration.
188+
The validators are associated with properties of the *TokenValidationParameters* class. The properties are initialized from the ASP.NET and ASP.NET Core configuration.
190189

191190
In most cases, you don't need to change the parameters. Apps that aren't single tenants are exceptions. These web apps accept users from any organization or from personal Microsoft accounts. Issuers in this case must be validated. Microsoft.Identity.Web takes care of the issuer validation as well.
192191

0 commit comments

Comments
 (0)