Create an override for a sender identified by an SMTP address. Future messages from that SMTP address will be consistently classified
as specified in the override.
Note
If an override already exists with the same SMTP address, then the classifyAs and name fields of that override are updated with the provided values.
The maximum number of overrides supported for a mailbox is 1000, based on unique sender SMTP addresses.
The POST operation supports creating only one override at a time.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
Mail.ReadWrite
Delegated (personal Microsoft account)
Mail.ReadWrite
Application
Mail.ReadWrite
HTTP request
POST /me/inferenceClassification/overrides
POST /users/{id}/inferenceClassification/overrides
Request headers
Name
Type
Description
Authorization
string
Bearer {token}. Required.
Content-Type
string
Nature of the data in the body of an entity. Required.
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new InferenceClassificationOverride
{
ClassifyAs = InferenceClassificationType.Focused,
SenderEmailAddress = new EmailAddress
{
Name = "Samantha Booth",
Address = "samanthab@adatum.onmicrosoft.com",
},
};
var result = await graphClient.Me.InferenceClassification.Overrides.PostAsync(requestBody);
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new InferenceClassificationOverride();
$requestBody->setClassifyAs(new InferenceClassificationType('focused'));
$senderEmailAddress = new EmailAddress();
$senderEmailAddress->setName('Samantha Booth');
$senderEmailAddress->setAddress('samanthab@adatum.onmicrosoft.com');
$requestBody->setSenderEmailAddress($senderEmailAddress);
$result = $graphServiceClient->me()->inferenceClassification()->overrides()->post($requestBody);
Import-Module Microsoft.Graph.Mail
$params = @{
classifyAs = "focused"
senderEmailAddress = @{
name = "Samantha Booth"
address = "samanthab@adatum.onmicrosoft.com"
}
}
# A UPN can also be used as -UserId.
New-MgUserInferenceClassificationOverride -UserId $userId -BodyParameter $params