Afaik you need to provide the GUID of the user, the API cannot resolve the object when specifying other identifiers such as UPN.
Is it possible to retrieve get presence by "UserPrincipalName" from Microsoft Graph API?

Hello everyone,
I hope you all are feeling well!
Please correct me if I am wrong. I want to pull/fetch user status from the get_presence graph API using "userPrincipalName" e.g
****https://graph.microsoft.com/beta/users/XYZ[@](/users/na/?userId=19d591f5-0000-0003-0000-000000000000).com/presence\*\*\*\*
when I used ID to get presence status from graph API then postman response right like
****https://graph.microsoft.com/beta/users/{id}/presence\*\*\*\*
when I try to get user presence status user Mail/userPrincipalName then the response is not right. like
****https://graph.microsoft.com/beta/users/XYZ[@](/users/na/?userId=19d591f5-0000-0003-0000-000000000000).com/presence\*\*\*\*
If it is possible to Get Presence by Mail/userPrincipalName then post a query for me thanks in advance.
Microsoft Security | Microsoft Entra | Microsoft Entra ID
-
Vasil Michev 119.6K Reputation points MVP Volunteer Moderator
2021-12-02T08:50:44.27+00:00