0
votes

I'm using Azure Media Services. I have an encoded asset placed there with Content Key and Asset Delivery Policy. I'm also using the Token restriction.

I am able to stream the video well on localhost but as soon as I deployed the application to the server it stopped streaming and giving an error code: 0x20500006 (of Azure Media Player).

When I checked all the requests I found that there is a request to Key Delivery service with some KID and it returned the following response:

<Error>
    <Message>
       Failed authorization policy evaluation.
    </Message>
    <Code>
       Unauthorized
    </Code>
</Error>

I am using the HTTPS protocol on the server also tried over HTTP as well but got no response.

1

1 Answers

0
votes

I responded to your post on MSDN. Posting on here for visibility.

"There are different reasons for the unauthorized error. It may be due to one of the following reasons:

  • Missing authentication header.
  • Bad authentication header value. -The token has expired. -The token contains an invalid signature.
  • Policy misconfiguration
  • No token in the request

Please double check to make sure your token has not expired. Also, for the Media Services REST request to succeed, the calling user must be a Contributor or Owner role in the Media Services account it is trying to access. For more information, see this documentation about Access control."