ThreatAssessment.ReadWrite.All
Allows an app to read your organization's threat assessment requests on behalf of the signed-in user. Also allows the app to create new requests to assess threats received by your organization on behalf of the signed-in user.
Permission Details
Read and write threat assessment requests
Allows an app to read your organization's threat assessment requests on behalf of the signed-in user. Also allows the app to create new requests to assess threats received by your organization on behalf of the signed-in user.
cac97e40-6730-457d-ad8d-4852fddab7ad
Properties
Properties is shown from stable Microsoft Graph v1.0 metadata.
| Property | Type | Description |
|---|---|---|
category |
threatCategory |
The threat category. The possible values are: spam, phishing, malware. |
contentType |
threatAssessmentContentType |
The content type of threat assessment. The possible values are: mail, url, file. |
createdBy |
identitySet |
The threat assessment request creator. |
createdDateTime |
DateTimeOffsetNullable |
The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. |
expectedAssessment |
threatExpectedAssessment |
The expected assessment from submitter. The possible values are: block, unblock. |
id |
String |
The threat assessment request ID is a globally unique identifier (GUID). |
requestSource |
threatAssessmentRequestSource |
The source of the threat assessment request. The possible values are: administrator. |
status |
threatAssessmentStatus |
The assessment process status. The possible values are: pending, completed. |
results |
threatAssessmentResult collection |
A collection of threat assessment results. Read-only. By default, a GET /threatAssessmentRequests/{id} does not return this property unless you apply $expand on it. |
JSON Representation
JSON representation is shown from stable Microsoft Graph v1.0 metadata.
{
"category": "String",
"contentType": "String",
"createdBy": {
"@odata.type": "microsoft.graph.identitySet"
},
"createdDateTime": "String (timestamp)",
"expectedAssessment": "String",
"id": "String (identifier)",
"requestSource": "String",
"status": "String"
}
Relationships
Relationships is shown from stable Microsoft Graph v1.0 metadata.
| Relationship | Type | Description |
|---|---|---|
results |
threatAssessmentResult collection |
A collection of threat assessment results. Read-only. By default, a GET /threatAssessmentRequests/{id} does not return this property unless you apply $expand on it. |
category |
threatCategory |
Related category data exposed by this resource. |
expectedAssessment |
threatExpectedAssessment |
Related expectedAssessment data exposed by this resource. |
Graph Methods
Microsoft Graph v1.0 endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
| Methods |
|---|
GET
/informationProtection/threatAssessmentRequests
|
GET
/informationProtection/threatAssessmentRequests/{id}
|
POST
/informationProtection/threatAssessmentRequests
|
Microsoft Graph beta endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
| Methods |
|---|
GET
/informationProtection/threatAssessmentRequests
|
GET
/informationProtection/threatAssessmentRequests/{id}
|
POST
/informationProtection/threatAssessmentRequests
|
Microsoft Graph PowerShell v1.0 commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Microsoft Graph PowerShell beta commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Code Examples
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new MailAssessmentRequest
{
OdataType = "#microsoft.graph.mailAssessmentRequest",
RecipientEmail = "[email protected]",
ExpectedAssessment = ThreatExpectedAssessment.Block,
Category = ThreatCategory.Spam,
MessageUri = "https://graph.microsoft.com/v1.0/users/c52ce8db-3e4b-4181-93c4-7d6b6bffaf60/messages/AAMkADU3MWUxOTU0LWNlOTEt=",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.InformationProtection.ThreatAssessmentRequests.PostAsync(requestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const threatAssessmentRequest = {
'@odata.type': '#microsoft.graph.mailAssessmentRequest',
recipientEmail: '[email protected]',
expectedAssessment: 'block',
category: 'spam',
messageUri: 'https://graph.microsoft.com/v1.0/users/c52ce8db-3e4b-4181-93c4-7d6b6bffaf60/messages/AAMkADU3MWUxOTU0LWNlOTEt='
};
await client.api('/informationProtection/threatAssessmentRequests')
.post(threatAssessmentRequest);
Import-Module Microsoft.Graph.Identity.SignIns
$params = @{
"@odata.type" = "#microsoft.graph.mailAssessmentRequest"
recipientEmail = "[email protected]"
expectedAssessment = "block"
category = "spam"
messageUri = "https://graph.microsoft.com/v1.0/users/c52ce8db-3e4b-4181-93c4-7d6b6bffaf60/messages/AAMkADU3MWUxOTU0LWNlOTEt="
}
New-MgInformationProtectionThreatAssessmentRequest -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.mail_assessment_request import MailAssessmentRequest
from msgraph.generated.models.threat_expected_assessment import ThreatExpectedAssessment
from msgraph.generated.models.threat_category import ThreatCategory
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = MailAssessmentRequest(
odata_type = "#microsoft.graph.mailAssessmentRequest",
recipient_email = "[email protected]",
expected_assessment = ThreatExpectedAssessment.Block,
category = ThreatCategory.Spam,
message_uri = "https://graph.microsoft.com/v1.0/users/c52ce8db-3e4b-4181-93c4-7d6b6bffaf60/messages/AAMkADU3MWUxOTU0LWNlOTEt=",
)
result = await graph_client.information_protection.threat_assessment_requests.post(request_body)
App Registration
Navigate to Azure Portal
Go to App registrations in Microsoft Entra admin center
Add API Permission
Select your app → API permissions → Add a permission → Microsoft Graph
Select Permission Type
Choose Delegated permissions and search for ThreatAssessment.ReadWrite.All
Grant Admin Consent
This delegated permission requires admin consent.