MS Graph Explorer-列出已加入的团队-错误404 [英] MS Graph Explorer - List joined teams - error 404

查看:94
本文介绍了MS Graph Explorer-列出已加入的团队-错误404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了数百篇与几个MS graph Explorer API问题相关的帖子,但我自己却无法解决.希望我不会与其他文章重叠,并且您会很友善:) !!

我正在尝试在我的打字稿(angular-cli)应用中执行以下请求:

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

使用以下代码:

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()
  );
}

仅供参考:

  • 令牌很好(我设法在同一应用程序中出于其他目的计算其他查询,例如一个驱动器...)
  • Auth过程进行得很好
  • 该代码是无错误的(我希望)来自MS官方示例,但进行了一些调整,但核心开发人员不是我的=> https://github.com/microsoftgraph/angular4-connect-sample
  • 我正在使用以下权限:

    范围:"User.Read,User.Read.All,User.ReadWrite.All,Files.Read.All,Files.ReadWrite.All,Sites.Read.All,Sites.ReadWrite.All,组.Read.All,Group.ReadWrite.All'

这是我从Graph API的http响应中总是得到的:

VM3361 polyfills.js:3372 GET https://graph.microsoft.com/beta/我/已加入团队 404(未找到)

我还直接在MS Graph资源管理器工具中运行了查询,但不幸的结果与您在下面看到的结果相同:

请注意,我已经加入了团队,您将在下文中看到

另外,我在Azure AD上拥有一个会员帐户,如下图所示:

解决方案

根据您的描述,我假设您想列出已加入的团队,但会得到404错误代码.

根据我的测试,可能出现此问题的原因有两个.

#1,当我们使用以下API时,我们应该首先登录我们的团队.

GET /beta/me/joinedTeams

#2,我们应该使用有效的Azure AD帐户访问API. Azure AD帐户中的来宾帐户可能无法访问团队资源.

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 :

解决方案

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.

这篇关于MS Graph Explorer-列出已加入的团队-错误404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆