Search code examples
azureasp.net-identityazure-active-directoryazure-functionsazure-media-services

Azure Media Services v3 Not Compatible with Azure Function


I am trying to recreate this walkthrough

https://learn.microsoft.com/en-us/azure/media-services/latest/stream-files-tutorial-with-api#download-the-sample

as an Azure Function, and it seems there is some incompatibility between the Azure Function SDK and Microsoft.IdentityModel.Clients.ActiveDirectory. If you try to create a new ArmClientCredentials like so

ArmClientCredentials credentials = new ArmClientCredentials(config);

You get an error like so

Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.19.4.11002

The particular nuget package is added to the project. Is this something that requires an additional step not shown here?


Solution

  • I was able to solve this problem by rolling down the version of the package to 3.14. here is the repo of the solution (using csproj)

    https://github.com/isaac2004/AzureMediaServicesDemo