@@ -6,7 +6,7 @@ ms.service: defender-endpoint
6
6
ms.author : siosulli
7
7
author : siosulli
8
8
ms.localizationpriority : medium
9
- ms.date : 03/19 /2024
9
+ ms.date : 06/28 /2024
10
10
manager : deniseb
11
11
audience : ITPro
12
12
ms.collection :
@@ -191,19 +191,19 @@ See [Get token using Python](run-advanced-query-sample-python.md#get-token).
191
191
> [! NOTE ]
192
192
> The following procedure assumes that Curl for Windows is already installed on your computer .
193
193
194
- 1. Open a command prompt , and set CLIENT_ID to your Azure application ID .
194
+ 1. Open a command prompt , and set ` CLIENT_ID ` to your Azure application ID .
195
195
196
- 1 . Set CLIENT_SECRET to your Azure application secret .
196
+ 1 . Set ` CLIENT_SECRET ` to your Azure application secret .
197
197
198
- 1 . Set TENANT_ID to the Azure tenant ID of the customer that wants to use your app to access Defender for Endpoint .
198
+ 1 . Set ` TENANT_ID ` to the Azure tenant ID of the customer that wants to use your app to access Defender for Endpoint .
199
199
200
200
1 . Run the following command :
201
201
202
202
```console
203
203
curl - i - X POST - H " Content-Type:application/x-www-form-urlencoded" - d " grant_type=client_credentials" - d " client_id=%CLIENT_ID%" - d " scope=https://securitycenter.onmicrosoft.com/windowsatpservice/.default" - d " client_secret=%CLIENT_SECRET%" " https://login.microsoftonline.com/%TENANT_ID%/oauth2/v2.0/token" - k
204
204
```
205
205
206
- You will get an answer in the following form :
206
+ You get an answer that resembles the following code snippet :
207
207
208
208
```console
209
209
{" token_type" : " Bearer" ," expires_in" : 3599 ," ext_expires_in" : 0 ," access_token" : " eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIn <truncated> aWReH7P0s0tjTBX8wGWqJUdDA" }
@@ -215,7 +215,7 @@ Ensure that you got the correct token:
215
215
216
216
1 . Copy and paste the token you got in the previous step into [JWT ](https :// jwt.ms) in order to decode it.
217
217
218
- 1 . Validate that you get a ' roles' claim with the desired permissions .
218
+ 1 . Validate that you get a roles claim with the desired permissions .
219
219
220
220
In the following image , you can see a decoded token acquired from an app with permissions to all of Microsoft Defender for Endpoint 's roles:
221
221
@@ -225,7 +225,7 @@ Ensure that you got the correct token:
225
225
226
226
1 . Choose the API you want to use . For more information , see [Supported Defender for Endpoint APIs ](exposed - apis - list .md ).
227
227
228
- 1 . Set the authorization header in the http request you send to " Bearer {token}" (Bearer is the authorization scheme ).
228
+ 1 . Set the authorization header in the ` http ` request you send to ` Bearer {token }` (Bearer is the authorization scheme ).
229
229
230
230
1 . The expiration time of the token is one hour . You can send more than one request with the same token .
231
231
0 commit comments