Forum Discussion
Not Getting Data from Graph rest api for MS Team
Hi,
I've created an app at https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade
I can do oauth using my credentials and getting token to access secure resource through it, but I'm getting empty result when i query the following api
https://graph.microsoft.com/v1.0/teams
or
https://graph.microsoft.com/v1.0/users/{userID}/joinedTeams
though I've teams in my teams account but the response return empty result as follows
20 Replies
- Mamatha-MSFT
Microsoft
Hi hidayat3676, To list joined teams for user you need application level permissions. Please go through this documentation for more details.
GET https://graph.microsoft.com/v1.0/users/{id}/joinedTeams
and to list channels using graph API use
GET https://graph.microsoft.com/v1.0/teams/{team-id}/channels
- hidayat3676Copper Contributor
Mamatha-MSFT Hi,
Thanks for your response
I already have these permission you can see in the image attach, plus what about my first api teams api which return empty data ?
- Mamatha-MSFT
Microsoft
Hi hidayat3676, I have gone through your screenshot but few permissions are missing.
TeamSettings.Read.All, TeamSettings.ReadWrite.All, User.Read.All, User.ReadWrite.All, Directory.ReadWrite.All
Please make sure to add these permissions and let us know if the issue still persists.
and Get https://graph.microsoft.com/v1.0/teams is not a valid request.