是否可以获取租户中所有团队的列表?

Is it possible to get a list of all Teams in a tenant?

我知道很长一段时间都没有这个选项了,但是有什么方法可以得到我们租户中活跃团队的列表吗? PowerBi 中可能有解决方案吗?

谢谢!

目前,我们无法直接获取租户中活动团队的列表,但我可以为您提供解决方法。

首先,为每个用户使用graph user api to get the user list of current Tenant. And then iterate over the result list and call JoinedTeams。最后,将所有团队合并为一个列表。

一些伪代码:

var userList= GET https://graph.microsoft.com/beta/users
List<Object> teamList=new List<Object>();
foreach(user in userList)
{
   var teamsForUser= GET https://graph.microsoft.com/beta/me/joinedTeams
   teamList.AddRange(teamsForUser);
}

添加一个simple way:

  GET https://graph.microsoft.com/beta/groups?$filter=resourceProvisioningOptions/Any(x:x eq ‘Team’)”

我们正在努力 APIs 让所有团队都属于一个特定的租户;应该在 2018 年 9 月底准备就绪。准备就绪后,joinedTeams API 将为租户管理员用户 return 租户中的所有团队。

实际上我不久前编写了一个 PowerShell 脚本并将其发布在 TechNet 脚本库中,以检索您组织内所有 Microsoft 团队的列表。

发表于https://gallery.technet.microsoft.com/Get-a-list-of-all-Teams-68a45e0a

更多使用方法可以参考我的博客post https://www.srdn.io/2018/08/get-all-microsoft-teams-within-your-organization/