Apr 21 2021 11:39 PM
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
Apr 22 2021 04:59 AM - edited Apr 26 2021 03:31 AM
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
Apr 22 2021 05:56 AM
@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 ?
Apr 23 2021 05:41 AM
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.
Apr 25 2021 11:30 PM
Hi @Mamatha-MSFT ,
I 've added these permissions but still no luck
firstly is it necessary to add write permission for resources that i only want to read?
2nd if Get https://graph.microsoft.com/v1.0/teams is invalid why it return 200 ok?
3rd no endpoint except /users, /users/{id}, /me working for me when i used post request for create a resource it return 405 and when use GET it either return empty data in some end point and on others it return 404.
Can you please explain this?
See Attached Images for reference.
Thanks
Apr 26 2021 12:41 AM
Hi @hidayat3676, To get team you need to append team-id for your request. Please go through this documentation.
GET https://graph.microsoft.com/v1.0/teams/{teams-id}
For GET https://graph.microsoft.com/v1.0/me/joinedTeams can you please share the error screenshot.
As per your postman screenshot your trying to create a group using POST https://graph.microsoft.com/v1.0/groups. I think you don't have required permissions to create a group (Group.Create, Group.ReadWrite.All, Directory.ReadWrite.All). Please go through this documentation to create a group.
Could you please specify what exactly you want to get. So that I can guide you.
Apr 26 2021 01:20 AM - edited Apr 26 2021 04:40 AM
@Mamatha-MSFT
Thanks for your response
I already have attached my permission list ss.
Actually I'm developing a Saas based app, I want to get all teams of the organization or the account that install my app, their groups, channels, chats, installed apps and all users
Response For GET https://graph.microsoft.com/v1.0/me/joinedTeams
{
"error": {
"code": "ResourceNotFound",
"message": "Resource not found.",
"innerError": {
"date": "2021-04-26T08:18:32",
"request-id": "2264149e-2352-4d72-9dae-b22e09f1be52",
"client-request-id": "2264149e-2352-4d72-9dae-b22e09f1be52"
}
}
}
I've teams and channels in my account.
Please Guide me about how can i get the above data?
Thanks.
Apr 27 2021 04:27 AM
Hi @hidayat3676 Please follow these steps to get List joinedTeams
1. Add required permissions to get List joinedTeams
2. Get Access Token
3. get List joinedTeams using GET https://graph.microsoft.com/v1.0/users/{id}/joinedTeams . Please see the below image.
Try these steps and let me know if the issue still persists.
Apr 28 2021 01:17 AM
Apr 28 2021 11:11 PM
Hi @Mamatha-MSFT,
I'm getting teams if i do oauth using organization admin but still i'm unable to get the team channels or single team info check ss below for details.
using https://graph.microsoft.com/v1.0/teams/{team_id}
Can you please confirm what is the issue?
Thanks.
Apr 29 2021 05:05 AM
Hi @hidayat3676 To Get team, are you using application level permissions or delegated level permissions? If your using application level permissions, the permissions marked with * use resource-specific consent. The resource specific consent permissions need to be added in manifest.
Please go through the documentation.
https://docs.microsoft.com/en-us/graph/api/team-get?view=graph-rest-1.0&tabs=http
Apr 29 2021 05:43 AM - edited Apr 29 2021 05:54 AM
Should i manually add these RSC to manifest or it is added auto when i add permission from the permission list ?
Also by * you mean {resourse}.{permission}.All ?
Apr 29 2021 11:14 PM
Apr 30 2021 02:43 AM
Hi @hidayat3676, Please go through this RSC sample.
Apr 30 2021 03:30 AM - edited Apr 30 2021 04:25 AM
@Mamatha-MSFTThis is different to my already auto generated manifest.
Should i create the whole manifest manually and then upload it ?
Also while Searching the error i found this
https://docs.microsoft.com/en-us/graph/teams-protected-apis
should i fill the form or ignore ?
Apr 30 2021 05:16 AM
Hi @hidayat3676 Yes you need create the whole manifest manually and then upload it. Please follow the steps provided in this documentation.
Get https://graph.microsoft.com/v1.0/teams/{team_id} is not under protected API. There is no need to fill the request form.
May 02 2021 10:18 PM - edited May 03 2021 12:03 AM
Hi Mamatha-MSFT,
But i also need the other end points mentioned in the protected api list should i fill form for it or it will also be resolved using the manifest ?
May 03 2021 12:46 AM
@hidayat3676 Yes. If you are using protected API you need to request access. Please fill the form to request access.
May 03 2021 03:26 AM - edited May 03 2021 03:26 AM
@Mamatha-MSFT
Done With the form, Can you tell till when it is expected for my app to be given access to the protected Api's ?
May 03 2021 03:29 AM