Get presence (forbidden)

Yan 11 Reputation points
2021-07-26T13:44:19.527+00:00

Hi all,
I am trying to get MS presence (e.g. available, busy) to my application but faced with some problems.
I have granted a delegated permission "Presence.Read.All" based on MS documentation but I still receive a "Forbidden" error in the response.
This problem reproduces with presence only, when I am getting other user data everything is okay.

Could please anyone advise what might be wrong?
117991-image.png

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,568 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Matt Duguid 0 Reputation points
    2023-01-11T20:31:49.05+00:00

    Having a similar issue but using the powershell cmdlets and my account only.

    My scope is,

    $scopes = "User.Read"

    Query of my user account works fine with this command,

    Get-MgUser -UserId $userId

    Query of my presence fails with this command and the error is "Get-MgUserPresence : The server responded with a Request Error, Status: Forbidden",

    Get-MgUserPresence -UserId $userId

    I would expect to be able to query my own presence information using powershell/graph same as I can see in the teams UI app? I see the API for that is still beta am I missing something here?