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/active-directory/develop/scenario-web-api-call-api-app-configuration.md
+24-48Lines changed: 24 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,27 +81,19 @@ Instead of a client secret, you can provide a client certificate. The following
81
81
82
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.
83
83
84
-
## Startup.cs
84
+
## Program.cs
85
85
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 *Startup.cs*:
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.
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.
@@ -111,26 +103,18 @@ If you don't want to acquire the token yourself, *Microsoft.Identity.Web* provid
111
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:
112
104
113
105
1. Add the [Microsoft.Identity.Web.MicrosoftGraph](https://www.nuget.org/packages/Microsoft.Identity.Web.MicrosoftGraph) NuGet package to your project.
114
-
1. Add `.AddMicrosoftGraph()` after `.EnableTokenAcquisitionToCallDownstreamApi()` in the *Startup.cs* file. `.AddMicrosoftGraph()` has several overrides. Using the override that takes a configuration section as a parameter, the code becomes:
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:
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.
161
137
162
-
The following image shows the various possibilities of *Microsoft.Identity.Web* and their impact on the *Startup.cs* file:
138
+
The following image shows the various possibilities of *Microsoft.Identity.Web* and their impact on the *Program.cs* file:
163
139
164
140
:::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":::
Copy file name to clipboardExpand all lines: articles/purview/how-to-resource-set-pattern-rules.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ Below are the available types that can be used in static and dynamic replacers:
84
84
| ---- | --------- |
85
85
| string | A series of 1 or more Unicode characters including delimiters like spaces. |
86
86
| int | A series of 1 or more 0-9 ASCII characters, it can be 0 prefixed (e.g. 0001). |
87
-
| guid | A series of 32 or 8-4-4-4-12 string representation of an UUID as defineddefa in [RFC 4122](https://tools.ietf.org/html/rfc4122). |
87
+
| guid | A series of 32 or 8-4-4-4-12 string representation of an UUID as defined in [RFC 4122](https://tools.ietf.org/html/rfc4122). |
88
88
| date | A series of 6 or 8 0-9 ASCII characters with optionally separators: yyyymmdd, yyyy-mm-dd, yymmdd, yy-mm-dd, specified in [RFC 3339](https://tools.ietf.org/html/rfc3339). |
89
89
| time | A series of 4 or 6 0-9 ASCII characters with optionally separators: HHmm, HH:mm, HHmmss, HH:mm:ss specified in [RFC 3339](https://tools.ietf.org/html/rfc3339). |
90
90
| timestamp | A series of 12 or 14 0-9 ASCII characters with optionally separators: yyyy-mm-ddTHH:mm, yyyymmddhhmm, yyyy-mm-ddTHH:mm:ss, yyyymmddHHmmss specified in [RFC 3339](https://tools.ietf.org/html/rfc3339). |
@@ -276,4 +276,4 @@ Asset 4
276
276
277
277
## Next steps
278
278
279
-
Get started by [registering and scanning an Azure Data Lake Gen2 storage account](register-scan-adls-gen2.md).
279
+
Get started by [registering and scanning an Azure Data Lake Gen2 storage account](register-scan-adls-gen2.md).
Copy file name to clipboardExpand all lines: articles/web-application-firewall/ag/web-application-firewall-logs.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,11 +75,11 @@ Activity logging is automatically enabled for every Resource Manager resource. Y
75
75
76
76
5. Type a name for the settings, confirm the settings, and select **Save**.
77
77
78
-
### Activity log
78
+
## Activity log
79
79
80
80
Azure generates the activity log by default. The logs are preserved for 90 days in the Azure event logs store. Learn more about these logs by reading the [View events and activity log](../../azure-monitor/essentials/activity-log.md) article.
81
81
82
-
### Access log
82
+
## Access log
83
83
84
84
The access log is generated only if you've enabled it on each Application Gateway instance, as detailed in the preceding steps. The data is stored in the storage account that you specified when you enabled the logging. Each access of Application Gateway is logged in JSON format, as shown in the following example for v1:
85
85
@@ -176,7 +176,7 @@ For Application Gateway and WAF v2, the logs show a little more information:
176
176
}
177
177
```
178
178
179
-
###Performance log
179
+
## Performance log
180
180
181
181
The performance log is generated only if you have enabled it on each Application Gateway instance, as detailed in the preceding steps. The data is stored in the storage account that you specified when you enabled the logging. The performance log data is generated in 1-minute intervals. It is available only for the v1 SKU. For the v2 SKU, use [Metrics](../../application-gateway/application-gateway-metrics.md) for performance data. The following data is logged:
182
182
@@ -213,7 +213,7 @@ The performance log is generated only if you have enabled it on each Application
213
213
> [!NOTE]
214
214
> Latency is calculated from the time when the first byte of the HTTP request is received to the time when the last byte of the HTTP response is sent. It's the sum of the Application Gateway processing time plus the network cost to the back end, plus the time that the back end takes to process the request.
215
215
216
-
###Firewall log
216
+
## Firewall log
217
217
218
218
The firewall log is generated only if you have enabled it for each application gateway, as detailed in the preceding steps. This log also requires that the web application firewall is configured on an application gateway. The data is stored in the storage account that you specified when you enabled the logging. The following data is logged:
219
219
@@ -276,14 +276,14 @@ The firewall log is generated only if you have enabled it for each application g
276
276
277
277
```
278
278
279
-
###View and analyze the activity log
279
+
## View and analyze the activity log
280
280
281
281
You can view and analyze activity log data by using any of the following methods:
282
282
283
283
***Azure tools**: Retrieve information from the activity log through Azure PowerShell, the Azure CLI, the Azure REST API, or the Azure portal. Step-by-step instructions for each method are detailed in the [Activity operations with Resource Manager](../../azure-monitor/essentials/activity-log.md) article.
284
284
***Power BI**: If you don't already have a [Power BI](https://powerbi.microsoft.com/pricing) account, you can try it for free. By using the [Power BI template apps](/power-bi/service-template-apps-overview), you can analyze your data.
285
285
286
-
###View and analyze the access, performance, and firewall logs
286
+
## View and analyze the access, performance, and firewall logs
287
287
288
288
[Azure Monitor logs](../../azure-monitor/insights/azure-networking-analytics.md) can collect the counter and event log files from your Blob storage account. It includes visualizations and powerful search capabilities to analyze your logs.
0 commit comments