Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Cannot set the presence of another user" by using the Presence GraphAPI - changing the presence of another user #3096

Closed
N3XPW opened this issue Apr 2, 2024 · 2 comments

Comments

@N3XPW
Copy link

N3XPW commented Apr 2, 2024

Describe the bug
By using the grapAPI with the presence statusmessage function, i get the following error:
"Cannot set the presence of another user... Status: 401 Unauthorized"

I tried this with the graphapi over
https://developer.microsoft.com/en-us/graph/graph-explorer
and with the
Microsoft.Graph.Users.Actions
Powershell Module.

For both with my admin user that has the required consensts . (Presence.ReadWrite)

To Reproduce in Powershell
`Import-Module ActiveDirectory
Import-Module Microsoft.Graph.Authentication
Import-Module Microsoft.Graph.Users
Connect-MgGraph Presence.ReadWrite

$params = @{
statusMessage = @{
message = @{
content = "Hey, this is a test"
contentType = "text"
}
expiryDateTime = @{
dateTime = "2024-04-02T20:05:33.2079781"
timezone = "Europe/Berlin"
}
}
}
Set-MgUserPresenceStatusMessage -UserId "UserID" -BodyParameter $params
Disconnect-MgGraph`

To Reproduce in the graphAPI
url: https://graph.microsoft.com/v1.0/users/[UserID]/presence/setStatusMessage Body: { "statusMessage": { "message": { "content": "Hey, this is a test", "contentType": "text" } } }

Expected behavior
Chaning the statusmsg in teams

Screenshots
image

@ElinorW
Copy link
Contributor

ElinorW commented Apr 4, 2024

Hi @N3XPW , this is likely an issue with the Presence API.
Please post this on the Graph Q&A forum where the appropriate team will be able to help you out.

Copy link
Contributor

Hello @N3XPW

Thank you for reporting your concern. Unfortunately, we in the Graph Explorer team do not have any ownership of the APIs that are causing you issues. If you report this issue in the Microsoft Q&A forum, it will get routed to the appropriate team for them to triage.
https://aka.ms/askgraph
This issue will now be closed. If you encounter any issues with Graph Explorer in the future, please feel free to open an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants