Hi @SATO Yusuke ,
Currently presence-get API is not supported in application scope
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
GET /users/{id}/presence
) to get one's presence.Run whether user is logged on or not
option.To test This script, I am using Microsoft 365 developer instant sandbox. When I register the script to Azure Active Directory and request API permissions, I have selected "Application permissions" because the script runs in the background. But with this selection, I could not select the "Presence.Read.All" permission.
The permission "Presence.Read.All" is permission is required from the "GET /users/{id}/presence" API endpoint.
You can select the Presence.ReadWrite.All
permission, but I cannot use this permission because it requires Admin consent (I am not an administrator of Azure AD of our company). Also, I don't want to use this permission to avoid additional security risks. The script reads one's presence but doesn't modify it, so the Presence.Read.All
permission is enough for the script.
You can select the Presence.Read.All
permission when you select Delegated permissions
, but I think this option is not suitable for the script because it runs even if I have logged out from Windows.
How can I give minimum requisite permissions to a continuous-running script that uses GET /users/{id}/presence
API endpoint?
Hi @SATO Yusuke ,
Currently presence-get API is not supported in application scope
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.
@SATO Yusuke
Get User Presence API with Application Permission now available in Graph v1.0.
for more details See this comment The Graph API change log and documentation is not yet updated.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.