Hi @Rajen Jani
As per my testing setStatusMessage Graph API can only change the status message of the signed-In user using delegated permission only.
Currently, this API does not support application permission as provided in the documentation.
This API gives the error “Cannot set the presence of another user. Authenticated user: 27afc846-ccb1-4a66-xxxxxxxx. Requested user: xxxxxx-xx-x-x-xxxxxx” when the signed in user is different than user you are trying to set the status. If you want to change the status of a particular user, you need to be signed in as that user.
Please note: APIs under the /beta
version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.