setStatusMessage by an application for other users

gn-ains 20 Reputation points


I would like to know how is it possible for an application registered in Azure AD can make this call:{user-Id}/presence/setStatusMessage

From this link, presence: setStatusMessage - Microsoft Graph v1.0 | Microsoft Learn I can see that an application able to make the request, but can make the request on behalf of another user? If yes, how and what kind of permissions the application need?

I’m not asking about to retrieve an access token, only of how an application could make that POST request.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,423 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yakun Huang-MSFT 2,495 Reputation points Microsoft Vendor

    Hi @gn-ains

    You can use postman to send POST request and note that if you want to set the status of another user, use the application permission Presence.ReadWrite.All and use the client credential flow to get the token.

    After testing, the endpoint works very well, and the test results are as follows:

    Screenshot 2024-07-02 025510

    See this link for more information about client credential flows:

    See this link for sending requests using postman:

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

0 additional answers

Sort by: Most helpful