简体   繁体   English

如何使用REST API从Azure权限账户中提取角色分配信息?

[英]How to use REST API to extract role assignment information from a Azure Purview account?

I want to obtain role assignment information from Azure Purview instances using REST API calls in my application.我想在我的应用程序中使用 REST API 调用从 Azure Purview 实例获取角色分配信息。 The desired information is the email addresses and groups under each role as indicated by the red arrows in the image at the end.所需信息是每个角色下的 email 地址和组,如末尾图像中的红色箭头所示。

I have tried to follow the Microsoft doc ( link ) and tried the API below.我尝试按照 Microsoft 文档( 链接)进行操作并尝试了下面的API

GET {Endpoint}/policyStore/metadataRoles?api-version=2021-07-01-preview

However, I could only get the default metadata roles in the response, such as但是,我只能在响应中获取默认元数据角色,例如

purviewmetadatarole_builtin_data-source-administrator

I am new to Purview, so please forgive me if this is a silly question.我是 Purview 的新手,如果这是一个愚蠢的问题,请原谅我。 Is there an API that can properly extract role assignment information?有没有API可以正确提取角色分配信息的?

Image - Role assignment information is indicated by red arrows图像 - 角色分配信息由红色箭头指示

Metadata Roles – List REST API returns the list roles for Azure Purview Account. 元数据角色– 列表 REST API 返回 Azure 权限帐户的列表角色。

在此处输入图像描述

Metadata Policy - List All REST API returns the list or Get metadata polices for Azure Purview Account. 元数据策略 - 全部列出REST API 返回列表或获取 Azure 权限帐户的元数据策略。

在此处输入图像描述

Note: This attribute Value will be Object ID of the user/app registered in the Azure Active Directory.注意:此属性值将为Object ID

在此处输入图像描述

Metadata Policy - Get REST API returns Gets a metadata policy for Azure Purview Account. 元数据策略 - 获取REST API 返回获取 Azure Purview 帐户的元数据策略。

Note: Make sure to replace the {policyId} with the above value.注意:确保将 {policyId} 替换为上述值。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM