purview threatassessment get
Get a threat assessment
Usage
m365 purview threatassessment get [options]
Options
-i, --id <id>
The Id of the threat assessment.
--includeResults
Include the threat assessment results.
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,response
,full
. Default isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--verbose
Runs command with verbose logging.
--debug
Runs command with debug logging.
Examples
Get a threat assessment.
m365 purview threatassessment get --id c37d695e-d581-4ae9-82a0-9364eba4291e
Get a threat assessment including results.
m365 purview threatassessment get --id c37d695e-d581-4ae9-82a0-9364eba4291e --includeResults
Response
Standard Response
- JSON
- Text
- CSV
- Markdown
{
"id": "8aaba0ac-ec4d-4e62-5774-08db16c68731",
"createdDateTime": "2023-02-25T00:23:33.0550644Z",
"contentType": "mail",
"expectedAssessment": "block",
"category": "spam",
"status": "pending",
"requestSource": "administrator",
"recipientEmail": "john@contoso.com",
"destinationRoutingReason": "notJunk",
"messageUri": "https://graph.microsoft.com/v1.0/users/john@contoso.com/messages/AAMkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgBGAAAAAAC6jQfUzacTSIHqMw2yacnUBwBiOC8xvYmdT6G2E_hLMK5kAAAAAAEMAABiOC8xvYmdT6G2E_hLMK5kAALHNaMuAAA=",
"createdBy": {
"user": {
"id": "fe36f75e-c103-410b-a18a-2bf6df06ac3a",
"displayName": "John Doe"
}
}
}
category : spam
contentType : mail
createdBy : {"user":{"id":"fe36f75e-c103-410b-a18a-2bf6df06ac3a","displayName":"John Doe"}}
createdDateTime : 2023-02-25T00:23:33.0550644Z
destinationRoutingReason: notJunk
expectedAssessment : block
id : 8aaba0ac-ec4d-4e62-5774-08db16c68731
messageUri : https://graph.microsoft.com/v1.0/users/john@contoso.com/messages/AAMkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgBGAAAAAAC6jQfUzacTSIHqMw2yacnUBwBiOC8xvYmdT6G2E_hLMK5kAAAAAAEMAABiOC8xvYmdT6G2E_hLMK5kAALHNaMuAAA=
recipientEmail : john@contoso.com
requestSource : administrator
status : pending
id,createdDateTime,contentType,expectedAssessment,category,status,requestSource,recipientEmail,destinationRoutingReason,messageUri,createdBy
8aaba0ac-ec4d-4e62-5774-08db16c68731,2023-02-25T00:23:33.0550644Z,mail,block,spam,pending,administrator,john@contoso.com,notJunk,https://graph.microsoft.com/v1.0/users/john@contoso.com/messages/AAMkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgBGAAAAAAC6jQfUzacTSIHqMw2yacnUBwBiOC8xvYmdT6G2E_hLMK5kAAAAAAEMAABiOC8xvYmdT6G2E_hLMK5kAALHNaMuAAA=,"{""user"":{""id"":""fe36f75e-c103-410b-a18a-2bf6df06ac3a"",""displayName"":""John Doe""}}"
# purview threatassessment get --id "8aaba0ac-ec4d-4e62-5774-08db16c68731"
Date: 25/02/2023
## 8aaba0ac-ec4d-4e62-5774-08db16c68731
Property | Value
---------|-------
id | 8aaba0ac-ec4d-4e62-5774-08db16c68731
createdDateTime | 2023-02-25T00:23:33.0550644Z
contentType | mail
expectedAssessment | block
category | spam
status | pending
requestSource | administrator
recipientEmail | john@contoso.com
destinationRoutingReason | notJunk
messageUri | https://graph.microsoft.com/v1.0/users/john@contoso.com/messages/AAMkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgBGAAAAAAC6jQfUzacTSIHqMw2yacnUBwBiOC8xvYmdT6G2E\_hLMK5kAAAAAAEMAABiOC8xvYmdT6G2E\_hLMK5kAALHNaMuAAA=
includeResults
response
When we make use of the option includeResults
the response will differ.
- JSON
- Text
- CSV
- Markdown
{
"id": "8aaba0ac-ec4d-4e62-5774-08db16c68731",
"createdDateTime": "2023-02-25T00:23:33.0550644Z",
"contentType": "mail",
"expectedAssessment": "block",
"category": "spam",
"status": "pending",
"requestSource": "administrator",
"recipientEmail": "john@contoso.com",
"destinationRoutingReason": "notJunk",
"messageUri": "https://graph.microsoft.com/v1.0/users/john@contoso.com/messages/AAMkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgBGAAAAAAC6jQfUzacTSIHqMw2yacnUBwBiOC8xvYmdT6G2E_hLMK5kAAAAAAEMAABiOC8xvYmdT6G2E_hLMK5kAALHNaMuAAA=",
"createdBy": {
"user": {
"id": "fe36f75e-c103-410b-a18a-2bf6df06ac3a",
"displayName": "John Doe"
}
},
"results": [
{
"id": "a5455871-18d1-44d8-0866-08db16c68b85",
"createdDateTime": "2023-02-25T00:23:40.28Z",
"resultType": "checkPolicy",
"message": "No policy was hit."
}
]
}
category : spam
contentType : mail
createdBy : {"user":{"id":"fe36f75e-c103-410b-a18a-2bf6df06ac3a","displayName":"John Doe"}}
createdDateTime : 2023-02-25T00:23:33.0550644Z
destinationRoutingReason: notJunk
expectedAssessment : block
id : 8aaba0ac-ec4d-4e62-5774-08db16c68731
messageUri : https://graph.microsoft.com/v1.0/users/john@contoso.com/messages/AAMkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgBGAAAAAAC6jQfUzacTSIHqMw2yacnUBwBiOC8xvYmdT6G2E_hLMK5kAAAAAAEMAABiOC8xvYmdT6G2E_hLMK5kAALHNaMuAAA=
recipientEmail : john@contoso.com
requestSource : administrator
results : [{"id":"a5455871-18d1-44d8-0866-08db16c68b85","createdDateTime":"2023-02-25T00:23:40.28Z","resultType":"checkPolicy","message":"No policy was hit."}]
status : pending
id,createdDateTime,contentType,expectedAssessment,category,status,requestSource,recipientEmail,destinationRoutingReason,messageUri,createdBy,results
8aaba0ac-ec4d-4e62-5774-08db16c68731,2023-02-25T00:23:33.0550644Z,mail,block,spam,pending,administrator,john@contoso.com,notJunk,https://graph.microsoft.com/v1.0/users/john@contoso.com/messages/AAMkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgBGAAAAAAC6jQfUzacTSIHqMw2yacnUBwBiOC8xvYmdT6G2E_hLMK5kAAAAAAEMAABiOC8xvYmdT6G2E_hLMK5kAALHNaMuAAA=,"{""user"":{""id"":""fe36f75e-c103-410b-a18a-2bf6df06ac3a"",""displayName"":""John Doe""}}","[{""id"":""a5455871-18d1-44d8-0866-08db16c68b85"",""createdDateTime"":""2023-02-25T00:23:40.28Z"",""resultType"":""checkPolicy"",""message"":""No policy was hit.""}]"
# purview threatassessment get --id "8aaba0ac-ec4d-4e62-5774-08db16c68731" --includeResults "true"
Date: 25/02/2023
## 8aaba0ac-ec4d-4e62-5774-08db16c68731
Property | Value
---------|-------
id | 8aaba0ac-ec4d-4e62-5774-08db16c68731
createdDateTime | 2023-02-25T00:23:33.0550644Z
contentType | mail
expectedAssessment | block
category | spam
status | pending
requestSource | administrator
recipientEmail | john@contoso.com
destinationRoutingReason | notJunk
messageUri | https://graph.microsoft.com/v1.0/users/john@contoso.com/messages/AAMkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgBGAAAAAAC6jQfUzacTSIHqMw2yacnUBwBiOC8xvYmdT6G2E\_hLMK5kAAAAAAEMAABiOC8xvYmdT6G2E\_hLMK5kAALHNaMuAAA=