cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DSFlemming
Helper II
Helper II

403 Forbidden Teams User Presence

Hello, I'm trying to get a user's Teams Presence but not sure how to get around the 403 forbidden error.

 

DSFlemming_0-1663383722268.png

I'm guessing the API permissions on the app registration are enough. I'm using Presence.Read and Presence.Read.All as that worked in the Graph Explorer. 

 

DSFlemming_2-1663384951216.png

This is what the action looks like

 

DSFlemming_1-1663384132063.png

Any hints or advice that could point me in the right direction would be helpful.

 

6 REPLIES 6
lbendlin
Impactful Individual
Impactful Individual

use https://jwt.io  to examine if your bearer token has the required scope.

DSFlemming
Helper II
Helper II

Thanks for the tip. I checked the token in there and couldn't see a scope section. That's probably the problem but not sure why?

DSFlemming_0-1663474235503.png

 

When I check the token made by the graph explorer I can see the permissions scope: 

 

DSFlemming_1-1663474399296.png

Could there be something wrong with my app registration?

 

 

DSFlemming
Helper II
Helper II

Small progress, I created a new app registration with api permissions Presence.ReadWrite.All. Now the token shows that a role:

 

DSFlemming_2-1663476275494.png

 

But I still get a forbidden when I try to use it in a GET request.

lbendlin
Impactful Individual
Impactful Individual

Check if other scopes are required as well. Check all URLs.

DSFlemming
Helper II
Helper II

Thanks @lbendlin, I'll continue to work on this. What do you mean by "Check all URLs"?

lbendlin
Impactful Individual
Impactful Individual

The redirect URI, for example.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Kudoed Authors
Users online (2,588)