gpt4 book ai didi

azure - 通过网络事件从 Azure 广告获取群组成员

转载 作者:行者123 更新时间:2023-12-02 07:51:52 25 4
gpt4 key购买 nike

我想通过 adf 管道获取广告安全组中所有成员的列表

我遇到了这个Api方法:https://graph.microsoft.com/v1.0/groups/{group id}/成员

你们能帮助我如何通过 adf 管道通过 Web 事件运行此 Api。还有运行此 Api 之前我需要拥有的任何权限或访问权限。

感谢您的帮助和建议

最佳答案

我尝试在我的环境中重现相同的结果,并得到如下结果:

我创建了一个 Azure AD 应用程序并授予了 API 权限,如下所示:

enter image description here

通过创建网络事件生成如下访问 token :

  • 网址:https://login.microsoftonline.com/TenantID/oauth2/v2.0/token

  • 方法: POST

  • 正文: grant_type=client_credentials&client_id=<client_id>&client_secret=<client_secret>&scope=https://graph.microsoft.com/.default

  • header : Content-Type:application/x-www-form-urlencoded

enter image description here

我成功生成了访问 token ,如下所示:

enter image description here

我创建了 Azure AD 安全组并添加了成员​​:

enter image description here

要从 Azure AD 安全组获取所有成员的列表,请在 Web 事件 2 中使用查询,如下所示:

https://graph.microsoft.com/v1.0/groups/GroupID/members

身份验证中,使用此动态内容 Bearer @{activity('Web1').output.access_token}

enter image description here

我能够成功从 Azure AD 安全组获取所有成员的列表,如下所示:

enter image description here

引用:

List group members - Microsoft Graph v1.0 | Microsoft Learn

关于azure - 通过网络事件从 Azure 广告获取群组成员,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75221833/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com