尝试调用休息以获取Azure Analysis Service模型的同步状态时出现未授权错误 [英] Getting Unauthorized error while trying to call a rest to get the sync status of an Azure Analysis Service model

查看:66
本文介绍了尝试调用休息以获取Azure Analysis Service模型的同步状态时出现未授权错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用邮递员使用/sync rest api获取AAS模型的同步状态.

I am trying to get sync status of an AAS model using the /sync rest api using postman.

对于授权"步骤,

我已经创建了一个Web应用程序/API应用程序,并给出了以下内容,因为OAuth2在邮递员中获取访问令牌输入:

I have created a Web app / API App and given the following as the OAuth2 get access token inputs in postman:

验证URL::https://login.microsoftonline.com/< directory_id>/oauth2/authorize?resource =<应用程序ID>

Auth URL: https://login.microsoftonline.com/<directory_id>/oauth2/authorize?resource=<Application ID>

访问令牌URL::https://login.microsoftonline.com/< directory_id>/oauth2/token?resource =<应用程序ID>

Access Token URL: https://login.microsoftonline.com/<directory_id>/oauth2/token?resource=<Application ID>

客户端ID:<应用程序ID>

Client ID: <Application ID>

客户秘密:<秘密>

Client Secret: <Secret>

授权类型:授权码

以下是App中赋予的权限:

Following are the permissions given in App:

  • Azure Analysis Services:读取和写入所有模型
  • Windows Azure Active Directory

我还已将应用作为所有者添加到我的AAS访问控制-角色分配中

I have also added the app as Owner in my AAS Access Control - Role assignment

使用上述设置,我可以在邮递员中获取访问令牌并将其添加为请求的标头.

With the above settings, I was able to get the access token in postman and added it as header for the request.

添加标题后,我执行了以下操作:

After adding the header, I executed the following:

获取https://< location> .asazure.windows.net/servers/< db>/models/< model>/sync

GET https://<location>.asazure.windows.net/servers/<db>/models/<model>/sync

导致错误的原因:

请帮助我获取AAS模型的同步状态.

Please help me on getting the sync status of an AAS model.

推荐答案

似乎您在做大多数事情都是对的.除了没有这个 链接,即您需要具有服务器管理员角色权限才能执行这些调用.您能否添加此角色,然后再试一次?
It seems like you are doing most of the things right. Except there is not on this link that says, you need to have server admin role permission to execute these calls. Can you please add this role and try it again?


这篇关于尝试调用休息以获取Azure Analysis Service模型的同步状态时出现未授权错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆