Not Getting Data from Graph rest api for MS Team

Copper Contributor

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

{
"value": []
}
also the second api return response below
{
"error": {
"code": "ResourceNotFound",
"message": "Resource not found.",
"innerError": {
"date": "2021-04-22T06:34:22",
"request-id": "55e3a10e-6e63-466e-a4ed-c15e2cab56b7",
"client-request-id": "f50412d2-6beb-5af8-170c-7ac4fd27c448"
}
}
}
Can you please clarify how can i get data from MS teams ? data like teams, groups, channels, chats etc using graph api.
 
Thanks.
20 Replies