POST https://graph.microsoft.com/v1.0/communications/getPresencesByUserId
Content-Type: application/json
{
"ids": ["fa8bf3dc-eca7-46b7-bad1-db199b62afc3", "66825e03-7ef5-42da-9069-724602c31f6b"]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Communications.GetPresencesByUserId;
var requestBody = new GetPresencesByUserIdPostRequestBody
{
Ids = new List<string>
{
"fa8bf3dc-eca7-46b7-bad1-db199b62afc3",
"66825e03-7ef5-42da-9069-724602c31f6b",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Communications.GetPresencesByUserId.PostAsGetPresencesByUserIdPostResponseAsync(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"
graphcommunications "github.com/microsoftgraph/msgraph-sdk-go/communications"
//other-imports
)
requestBody := graphcommunications.NewGetPresencesByUserIdPostRequestBody()
ids := []string {
"fa8bf3dc-eca7-46b7-bad1-db199b62afc3",
"66825e03-7ef5-42da-9069-724602c31f6b",
}
requestBody.SetIds(ids)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
getPresencesByUserId, err := graphClient.Communications().GetPresencesByUserId().PostAsGetPresencesByUserIdPostResponse(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.communications.getpresencesbyuserid.GetPresencesByUserIdPostRequestBody getPresencesByUserIdPostRequestBody = new com.microsoft.graph.communications.getpresencesbyuserid.GetPresencesByUserIdPostRequestBody();
LinkedList<String> ids = new LinkedList<String>();
ids.add("fa8bf3dc-eca7-46b7-bad1-db199b62afc3");
ids.add("66825e03-7ef5-42da-9069-724602c31f6b");
getPresencesByUserIdPostRequestBody.setIds(ids);
var result = graphClient.communications().getPresencesByUserId().post(getPresencesByUserIdPostRequestBody);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Communications\GetPresencesByUserId\GetPresencesByUserIdPostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new GetPresencesByUserIdPostRequestBody();
$requestBody->setIds(['fa8bf3dc-eca7-46b7-bad1-db199b62afc3', '66825e03-7ef5-42da-9069-724602c31f6b', ]);
$result = $graphServiceClient->communications()->getPresencesByUserId()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.communications.get_presences_by_user_id.get_presences_by_user_id_post_request_body import GetPresencesByUserIdPostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = GetPresencesByUserIdPostRequestBody(
ids = [
"fa8bf3dc-eca7-46b7-bad1-db199b62afc3",
"66825e03-7ef5-42da-9069-724602c31f6b",
],
)
result = await graph_client.communications.get_presences_by_user_id.post(request_body)