locked
How to log on to Media Services from a job scheduled by the Azure Scheduler RRS feed

  • Question

  • Hi there,

    I'd like to get the Azure Scheduler to start a program on a live channel. I thought I'd try it out via the Azure web portal, to see if it's possible before I go much further. I'm getting stuck at the authentication stage though, because I can't find the right authentication settings for the scheduled job.

    Can someone help explain what I'm doing wrong please?

    I'm using the following settings on the "Action Settings" panel of the "Scheduler Job":

    Action: https
    Method: Get
    Url: (for example, to list programs) https://media.windows.net/api/Programs
    Authentication settings:
    Authentication type: Active Directory OAuth
    Tenant: The Tenant Id field I get from "azure account show" at the command line
    Client Id: My media services account name (not a GUID)
    Secret: My media services account secret
    Audience: https://wamsprodglobal001acs.accesscontrol.windows.net

    I get an error when I submit the scheduler job:

    At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details. (Code: DeploymentFailed)
    • Could not acquire token for the provided credentials. Exception message: 'AADSTS70001: Application with identifier '<media services account name>' was not found in the directory <My tenant ID>

    Thanks

    Alistair

    Monday, October 24, 2016 4:39 PM

Answers

  • We do not currently support AAD auth on our public REST endpoint.

    Our current REST API still uses the ACS authentication and access control. I believe that Azure Scheduler requires AD authentication only.

    Could you perhaps move your calls to start the channel and Programs into an Azure Function and call that from the Scheduler?  I have successfully written several Azure Functions that use the Media Services .NET SDK and Extensions library.

    See my sample functions here - https://github.com/AzureMediaServicesSamples/Media-Services-Azure-Functions

    None of them are currently using the Live services, but you can get the idea...

    • Marked as answer by Wayne Arly Friday, October 28, 2016 12:50 PM
    Thursday, October 27, 2016 9:27 PM

All replies

  • We do not currently support AAD auth on our public REST endpoint.

    Our current REST API still uses the ACS authentication and access control. I believe that Azure Scheduler requires AD authentication only.

    Could you perhaps move your calls to start the channel and Programs into an Azure Function and call that from the Scheduler?  I have successfully written several Azure Functions that use the Media Services .NET SDK and Extensions library.

    See my sample functions here - https://github.com/AzureMediaServicesSamples/Media-Services-Azure-Functions

    None of them are currently using the Live services, but you can get the idea...

    • Marked as answer by Wayne Arly Friday, October 28, 2016 12:50 PM
    Thursday, October 27, 2016 9:27 PM
  • Thanks, I didn't know about Azure Functions. That looks very interesting.

    Alistair

    Friday, October 28, 2016 12:50 PM
  • Let us know how you get along. I'm interested in hearing how you resolved it in the end.

    Also, interested in any feedback about the Live APIs that you would like us to improve on. We are working on a new API definition that will be in better alignment with the rest of the Azure services and appreciate any and all ideas and feedback from our users.

    Friday, October 28, 2016 4:52 PM