【发布时间】:2017-10-11 19:05:34
【问题描述】:
我正在尝试获取授权代码和令牌以访问时间序列环境。
我在 Azure Active Directory 中创建了一个应用程序,并按照 link 中的说明授予它访问时间序列环境的权限。之后,我得到了我的 client_id(应用程序 ID)、client_secret(应用程序密钥)和我的租户 ID。
然后我尝试按照此link 中的说明进行操作,并尝试在浏览器中获取资源“https://api.timeseries.azure.com/”的身份验证代码。我在浏览器中插入的地址是这样的:
https://login.microsoftonline.com/{tenant}/oauth2/authorize?client_id={client_id}&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%2F&response_mode=query&resource=https%3A%2F%2Fapi.timeseries.azure.com%2F&state=12345
我检查了三倍的值,在我看来一切都是正确的,但我的浏览器中不断出现以下错误:
AADSTS65005: Invalid resource. The client has requested access to a resource
which is not listed in the requested permissions in the client's application
registration. Client app ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. Resource
value from request: https://api.timeseries.azure.com/. Resource app ID:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. List of valid resources from app
registration: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
感谢您的帮助。
【问题讨论】:
-
只是为了确保在 Azure 门户中,您是否将时间序列资源添加到您的应用权限?
-
您好丹尼尔,感谢您的回复。在时序环境页面中,我在数据访问策略部分添加了注册的 App。在 Azure Active Directory -> 应用注册 -> 时序环境 -> 设置 -> 所需权限 -> 添加 API 访问权限 -> 选择一个 API,我没有看到任何与时序资源相关的 API。
标签: azure azure-active-directory azure-timeseries-insights