MS Graph Explorer - List joined teams - error 404

心不动则不痛 提交于 2020-02-27 03:34:24

问题


I've been reading hundreds and hundreds of posts related to several MS graph explorer API issues without being able to solve mine by myself; I hope I don't overlap with another post and that you'll be kind :) !!

I'm trying to perform the following request in my typescript (angular-cli) app :

https://graph.microsoft.com/beta/me/joinedTeams

with this code :

private findMyTeams() {
  const that = this;
  this.listMyTeams().subscribe(items => {
    that.joinedTeams = items.value; // used in html *ngFor
  });
}

listMyTeams() {
  var client = this.getClient();
  return from(client
    .api('me/joinedTeams')
    .version("beta")
    .get()
  );
}

FYI :

  • token is good (I managed to compute other queries in the same app for other purposes e.g One drive ...)
  • the Auth process went well
  • the code is bugfree (I hope) coming from MS official sample with a bit tweaks but the core dev is not mine => https://github.com/microsoftgraph/angular4-connect-sample
  • I'm using the following rights :

    scope: 'User.Read, User.Read.All, User.ReadWrite.All, Files.Read.All, Files.ReadWrite.All, Sites.Read.All, Sites.ReadWrite.All, Group.Read.All, Group.ReadWrite.All'

and this is what I always get as my http response from Graph API :

VM3361 polyfills.js:3372 GET https://graph.microsoft.com/beta/me/joinedTeams 404 (Not Found)

I've also run the query in MS Graph explorer tool directly and got the unfortunate same result as you can see here below :

Please note that I have already joined teams as you can see hereafter

And also that I have a member account on Azure AD as the screen below says so :


回答1:


According to your description, I assume you want to list the joined teams but get the 404 Error Code.

Based on my test, There are two reasons why this problem may occur.

#1, when we use the following API, we should login in our teams first.

GET /beta/me/joinedTeams

#2, we should use a valid Azure AD account to access the API. The guest account in the Azure AD Account may couldn’t access the teams resources.



来源:https://stackoverflow.com/questions/52795516/ms-graph-explorer-list-joined-teams-error-404

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!