gpt4 book ai didi

azure - 如何通过azure数据工厂生成不记名 token

转载 作者:行者123 更新时间:2023-12-02 23:34:35 24 4
gpt4 key购买 nike

我关注了这个blog用于生成不记名 token 。

我有一个像这样的API https://login.microsoftonline.com/<tenantid>/oauth2/token .

我在 postman 中测试了它,它可以工作,但在 ADF 中不起作用。

错误消息

"error": "invalid request"
"error description": "xxxx: The 'resource' request parameter is not supported. \r\nTrace ID: xxxxx\rnCorrelation ID: xxxx\r\nTimestamp: xxxx"
"error codes": [
901002

最佳答案

是的,您可以根据端点使用资源范围

如果您将端点与oauth2/token一起使用:https://login.microsoftonline.com/<tenant id>/oauth2/token

您需要使用resource=https://graph.microsoft.com/体内

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

enter image description here

如果您使用oauth2/v2.0/token端点 https://login.microsoftonline.com/<tenant id>/oauth2/v2.0/token

您需要使用scope :

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

enter image description here

成功执行的管道获得了 token :

enter image description here

关于azure - 如何通过azure数据工厂生成不记名 token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75230149/

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