首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在PowerBIClient内核中使用.NET获取用户访问列表

在PowerBIClient内核中使用.NET获取用户访问列表
EN

Stack Overflow用户
提问于 2022-03-23 05:56:31
回答 1查看 69关注 0票数 0

是否有任何方法可以获得具有powerbi访问权限的用户列表,或者如何使用Microsoft.PowerBI.Api在.net核心中检查具有powerbi访问权限的特定用户。

EN

Stack Overflow用户

发布于 2022-07-28 06:50:55

您可以使用GetGroupUsersAsAdmin (用户必须拥有使用它的管理员权限)来获取访问指定工作区的用户列表。如果您没有管理权限,则可以使用。(它的反应也将类似于GetGroupUsersAsAdmin)

示例:

代码语言:javascript
运行
复制
var client = new PowerBIClient(new Uri(pbiApiUrl), tokenCredentials);
client.Groups.GetGroupUsersAsync(GroupId);
client.Groups.GetGroupAsAdminAsync(GroupId);

反应会是这样:

代码语言:javascript
运行
复制
{
  "value": [
    {
      "displayName": "John Nick",
      "emailAddress": "john@contoso.com",
      "groupUserAccessRight": "Admin",
      "identifier": "john@contoso.com",
      "graphId": "3fadb6e4-130c-4a8f-aeac-416e38b66756",
      "principalType": "User"
    },
    {
      "displayName": "Adam Wood",
      "emailAddress": "Adam@contoso.com",
      "groupUserAccessRight": "Member",
      "identifier": "Adam@contoso.com",
      "graphId": "785e192c-0f1f-41ca-ae7a-a85da28e565a",
      "principalType": "User"
    },
    {
      "displayName": "ContosoTestApp",
      "groupUserAccessRight": "Admin",
      "identifier": "3d9b93c6-7b6d-4801-a491-1738910904fd",
      "graphId": "3d9b93c6-7b6d-4801-a491-1738910904fd",
      "principalType": "App"
    }
  ]
}

参考:

https://learn.microsoft.com/rest/api/power-bi/admin/groups-get-group-users-as-admin

https://learn.microsoft.com/rest/api/power-bi/groups/get-group-users

票数 0
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71582431

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档