我花了好几个小时试图通过服务主体身份验证生成访问令牌以使用Azure Media Service API。
我想在节点应用程序中使用它,但是我还没有能够使用Postman生成所需的令牌,其中的步骤记录在this blog post中。官方MS文档对此博客文章没有任何帮助。
这是我收到的错误消息
{
"error": "invalid_request",
"error_description": "ACS90004: The request is not properly formatted.\r\nTrace ID: 73ba5bee-b7d2-4d2c-8583-3c673baf4684\r\nCorrelation ID: ddd08f52-608c-4177-ad2f-112381cffe56\r\nTimestamp: 2017-12-07 08:58:32Z"
}
来自此POST请求
网址:https://wamsprodglobal001acs.accesscontrol.windows.net/v2/OAuth2-13
接头:
Content-Type:application/x-www-form-urlencoded
Host:wamsprodglobal001acs.accesscontrol.windows.net
Content-Length:120
Expect:100-Continue
Connection:Keep-Alive
Accept:application/json
体:
grant_type:client_credentials
scope:urn:WindowsAzureMediaServices
client_id:{{aad app id}}
client_secret:{{key generated in aad app}}
这里的任何帮助或良好的文档链接都会很棒。
答案 0 :(得分:0)
事实证明,问题中详述的方式是旧的,并且已弃用。
本教程允许我在使用https://rest.media.azure.net
作为资源主体参数
http://blog.jongallant.com/2017/03/azure-active-directory-access-tokens-postman/