// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Me.GetMailTips;
using Microsoft.Graph.Models;
var requestBody = new GetMailTipsPostRequestBody
{
EmailAddresses = new List<string>
{
"danas@contoso.com",
"fannyd@contoso.com",
},
MailTipsOptions = MailTipsType.AutomaticReplies | MailTipsType.MailboxFullStatus,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Me.GetMailTips.PostAsGetMailTipsPostResponseAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphusers "github.com/microsoftgraph/msgraph-sdk-go/users"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphusers.NewItemGetMailTipsPostRequestBody()
emailAddresses := []string {
"danas@contoso.com",
"fannyd@contoso.com",
}
requestBody.SetEmailAddresses(emailAddresses)
mailTipsOptions := graphmodels.AUTOMATICREPLIES, MAILBOXFULLSTATUS_MAILTIPSTYPE
requestBody.SetMailTipsOptions(&mailTipsOptions)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
getMailTips, err := graphClient.Me().GetMailTips().PostAsGetMailTipsPostResponse(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.users.item.getmailtips.GetMailTipsPostRequestBody getMailTipsPostRequestBody = new com.microsoft.graph.users.item.getmailtips.GetMailTipsPostRequestBody();
LinkedList<String> emailAddresses = new LinkedList<String>();
emailAddresses.add("danas@contoso.com");
emailAddresses.add("fannyd@contoso.com");
getMailTipsPostRequestBody.setEmailAddresses(emailAddresses);
getMailTipsPostRequestBody.setMailTipsOptions(EnumSet.of(MailTipsType.AutomaticReplies, MailTipsType.MailboxFullStatus));
var result = graphClient.me().getMailTips().post(getMailTipsPostRequestBody);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Users\Item\GetMailTips\GetMailTipsPostRequestBody;
use Microsoft\Graph\Generated\Models\MailTipsType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new GetMailTipsPostRequestBody();
$requestBody->setEmailAddresses(['danas@contoso.com', 'fannyd@contoso.com', ]);
$requestBody->setMailTipsOptions(new MailTipsType('automaticReplies, mailboxFullStatus'));
$result = $graphServiceClient->me()->getMailTips()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Users.Actions
$params = @{
EmailAddresses = @(
"danas@contoso.com"
"fannyd@contoso.com"
)
MailTipsOptions = "automaticReplies, mailboxFullStatus"
}
# A UPN can also be used as -UserId.
Get-MgUserMailTip -UserId $userId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.users.item.get_mail_tips.get_mail_tips_post_request_body import GetMailTipsPostRequestBody
from msgraph.generated.models.mail_tips_type import MailTipsType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = GetMailTipsPostRequestBody(
email_addresses = [
"danas@contoso.com",
"fannyd@contoso.com",
],
mail_tips_options = MailTipsType.AutomaticReplies | MailTipsType.MailboxFullStatus,
)
result = await graph_client.me.get_mail_tips.post(request_body)