使用Rest API发布数据资产时的未授权访问 [英] unauthorized Access when using rest API to post a data asset
问题描述
1.我按照说明在AD中注册应用程序,并按如下所示设置委派权限.
1. I followed the instruction to register an application in AD and set up delegated permission as below.
2.我使用以下REST API获取令牌
2. I used the following rest API to get a token
https://login.microsoftonline.com/{subscriptionID}/oauth2/token,带有
https://login.microsoftonline.com/{subscriptionID}/oauth2/token, with
资源设置为"https://api.azuredatacatalog.com/"
resource set to "https://api.azuredatacatalog.com/"
grant_type设置为"client_credentials"
grant_type set to "client_credentials"
3.然后,我将在步骤中获得的访问令牌用于,并使用以下其余API注册 新数据集
3. Then I used the access token obtained in step to and use the following rest API to register a new dataset
https://api.azuredatacatalog.com/catalogs/{catelog_name}/views/tables?api-version = 2016-03-30
https://api.azuredatacatalog.com/catalogs/{catelog_name}/views/tables?api-version=2016-03-30
但是我遇到了以下错误:
But I got the following error:
401-未经授权:由于凭据无效,访问被拒绝.
401 - Unauthorized: Access is denied due to invalid credentials.
您无权使用您提供的凭据查看此目录或页面.
You do not have permission to view this directory or page using the credentials that you supplied.
请帮助!
推荐答案
嗨莉莉,
您使用的是哪种开发语言?一旦您向我提供此信息,我便可以为您提供身份验证示例.
What development language are you using? I can provide an auth example for you once you provide me this info.
谢谢.
詹姆斯
这篇关于使用Rest API发布数据资产时的未授权访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!