mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-06-20 04:43:37 +00:00
fix scores
This commit is contained in:
@ -28,13 +28,13 @@ ms.topic: article
|
||||
|
||||
Run advanced queries using Python, see [Advanced Hunting API](run-advanced-query-api.md).
|
||||
|
||||
In this section we share Python samples to retrieve a token and use it to run a query.
|
||||
In this section, we share Python samples to retrieve a token and use it to run a query.
|
||||
|
||||
>**Prerequisite**: You first need to [create an app](apis-intro.md).
|
||||
|
||||
## Get token
|
||||
|
||||
- Run the following:
|
||||
- Run the following commands:
|
||||
|
||||
```
|
||||
|
||||
@ -67,9 +67,9 @@ aadToken = jsonResponse["access_token"]
|
||||
```
|
||||
|
||||
where
|
||||
- tenantId: ID of the tenant on behalf of which you want to run the query (i.e., the query will be run on the data of this tenant)
|
||||
- appId: ID of your AAD app (the app must have 'Run advanced queries' permission to Microsoft Defender ATP)
|
||||
- appSecret: Secret of your AAD app
|
||||
- tenantId: ID of the tenant on behalf of which you want to run the query (that is, the query will be run on the data of this tenant)
|
||||
- appId: ID of your Azure AD app (the app must have 'Run advanced queries' permission to Microsoft Defender ATP)
|
||||
- appSecret: Secret of your Azure AD app
|
||||
|
||||
## Run query
|
||||
|
||||
@ -96,7 +96,7 @@ results = jsonResponse["Results"]
|
||||
```
|
||||
|
||||
- schema contains the schema of the results of your query
|
||||
- results contains the results of your query
|
||||
- results contain the results of your query
|
||||
|
||||
### Complex queries
|
||||
|
||||
|
Reference in New Issue
Block a user