none
Authorization Bearer for AMS Media Processor RRS feed

  • Question

  • In Azure Media Services, when one has to get a Media Processor, where to get AccessToken for request Media Processor as documented in Media Services REST Guide (https://docs.microsoft.com/en-us/azure/media-services/media-services-rest-get-started#get-a-media-processor). I am talking about Authorization Bearer of that request.
    Tuesday, April 10, 2018 5:46 AM

Answers

  • AccessToken to be used here is the same as one obtained from Azure Active Directory (Documented Here: https://docs.microsoft.com/en-us/azure/media-services/media-services-rest-upload-files#connect-to-media-services). 

    What's confusing in the documentation for Encoder (https://docs.microsoft.com/en-us/azure/media-services/media-services-rest-get-started) is that all the AccessTokens shown in sample requests aren't alike JWTs obtained from AAD.

    • Marked as answer by emadehsan Tuesday, April 10, 2018 9:44 AM
    Tuesday, April 10, 2018 8:09 AM

All replies

  • AccessToken to be used here is the same as one obtained from Azure Active Directory (Documented Here: https://docs.microsoft.com/en-us/azure/media-services/media-services-rest-upload-files#connect-to-media-services). 

    What's confusing in the documentation for Encoder (https://docs.microsoft.com/en-us/azure/media-services/media-services-rest-get-started) is that all the AccessTokens shown in sample requests aren't alike JWTs obtained from AAD.

    • Marked as answer by emadehsan Tuesday, April 10, 2018 9:44 AM
    Tuesday, April 10, 2018 8:09 AM
  • Good feedback.  We should update all of those examples to have an authorization header and a bearer token that looks like this:

    authorization: Bearer {ENCODED AAD JWT TOKEN}

    The old examples are still showing ACS authentication. 

    Friday, April 13, 2018 11:35 PM
  • Also, just in case you missed this gem - 
    https://docs.microsoft.com/en-us/azure/media-services/postman-collection 

    There is a nice Postman collection up here to make it a lot easier to understand our REST API and how to use the Authentication Bearer header. 

    Thanks, 
    J.D.

    Friday, April 13, 2018 11:44 PM
  • Thanks for the gem. I've used this dozens of times now.
    • Edited by emadehsan Saturday, April 14, 2018 3:18 PM
    Saturday, April 14, 2018 6:43 AM