Skip to content

Commit 922aa90

Browse files
Update access-api.md
The client credentials flow sample provided calls AAD's v2.0 endpoint passing a resource parameter - this is not supported an will lead to an error. A proposed solution is to either call the v1 endpoint or call the v2 endpoint passing a scope parameter instead (whichever is supported by the API): Solution 1: ##### Client Credentials Token URL (POST request) ```http POST /<your-tenant-id>/oauth2/token Host: https://login.microsoftonline.com Content-Type: application/x-www-form-urlencoded grant_type=client_credentials &client_id=<app-client-id> &resource=https://api.loganalytics.io &client_secret=<app-client-secret> ``` Solution 2: ##### Client Credentials Token URL (POST request) ```http POST /<your-tenant-id>/oauth2/v2.0/token Host: https://login.microsoftonline.com Content-Type: application/x-www-form-urlencoded grant_type=client_credentials &client_id=<app-client-id> &scope=https://api.loganalytics.io/.default &client_secret=<app-client-secret> ```
1 parent bfdee90 commit 922aa90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

articles/azure-monitor/logs/api/access-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Use the `https://api.loganalytics.azure.com` endpoint.
118118
##### Client Credentials Token URL (POST request)
119119

120120
```http
121-
POST /<your-tenant-id>/oauth2/v2.0/token
121+
POST /<your-tenant-id>/oauth2/token
122122
Host: https://login.microsoftonline.com
123123
Content-Type: application/x-www-form-urlencoded
124124

0 commit comments

Comments
 (0)