AADSTS65005:资源无效。 (Azure时间序列见解API)

时间:2017-10-10 17:04:02

标签: azure azure-active-directory azure-timeseries-insights

我正在尝试获取授权码和令牌来访问时间序列环境。

我在Azure Active Directory中创建了一个应用程序,并按照此link中的说明授予其访问时间序列环境的权限。之后我获得了client_id(应用程序ID),client_secret(应用程序密钥)和我的租户ID。

然后我尝试按照此link中的说明操作,并尝试在浏览器中获取资源“https://api.timeseries.azure.com/”的身份验证代码。我在浏览器中插入的地址是这样的:

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.

我三倍检查了值,在我看来一切都是正确的,但我在浏览器中一直收到以下错误:

pd.merge_asof

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

终于发现了什么问题。我是一个微软天蓝色的菜鸟,但终于明白了。

问题是参数资源的值应为“https://api.timeseries.azure.com/”,因为它应该具有我正在尝试访问的资源的已注册应用程序(服务主体)的应用程序ID。

我还需要创建另一个已注册的应用程序作为客户端,并在所需权限中添加了我的资源的已注册应用程序。我错过了这一步,因为在尝试将API添加到所需权限时,它没有显示我的资源的已注册App名称,除非我使用名称的初始字符进行过滤,如https://blog.hompus.nl/2017/03/25/missing-azure-apis-when-adding-permissions-to-an-azure-ad-app/中所示。< / p>

在这种情况下,client_id参数应具有客户端注册App的应用程序ID。

之后我在浏览器中插入了具有正确值的地址,确认了访问权限,浏览器返回了验证码。