Skip to content

Commit 17a6adc

Browse files
committed
fixes
1 parent 6d0bae3 commit 17a6adc

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

articles/azure-monitor/app/azure-ad-authentication.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,31 @@ The Application Insights API supports Microsoft Entra authentication with three
294294

295295
In the client credentials flow, the token is used with the Application Insights endpoint. A single request is made to receive a token by using the credentials provided for your app in the previous step when you [register an app in Microsoft Entra ID](../logs/api/register-app-for-token.md).
296296

297-
Use `resource=https://api.applicationinsights.io`.
297+
Use the `https://api.applicationinsights.io` endpoint.
298298

299-
[!INCLUDE [Get a token](../includes/get-a-token.md)]
299+
##### Client credentials token URL (POST request)
300+
301+
```http
302+
POST /<your-tenant-id>/oauth2/token
303+
Host: https://login.microsoftonline.com
304+
Content-Type: application/x-www-form-urlencoded
305+
306+
grant_type=client_credentials
307+
&client_id=<app-client-id>
308+
&resource=https://api.applicationinsights.io
309+
&client_secret=<app-client-secret>
310+
```
311+
312+
A successful request receives an access token in the response:
313+
314+
```http
315+
{
316+
token_type": "Bearer",
317+
"expires_in": "86399",
318+
"ext_expires_in": "86399",
319+
"access_token": ""eyJ0eXAiOiJKV1QiLCJ.....Ax"
320+
}
321+
```
300322

301323
Use the token in requests to the Application Insights endpoint:
302324

0 commit comments

Comments
 (0)