Azure-activedirectory-identitymodel-extensions-for-dotnet: Method not found: 'ICollection<SecurityKey>OpenIdConnectConfiguration.get_SigningKeys()' in AzureFunctions

Created on 23 Nov 2018  路  3Comments  路  Source: AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet

Hi there!

I am trying to validate a jwt token in an Azure Functions application (C#).
It is .netstandard 2.0 and I am using the Microsoft.IdentityModel.JsonWebTokens nuget package.

I load the signing keys from Azure like this:

var configManager = new ConfigurationManager<OpenIdConnectConfiguration>({stsDiscoveryEndpoint}, new OpenIdConnectConfigurationRetriever());
var config = await configManager.GetConfigurationAsync();
issuer = config.Issuer + "v2.0/";
signingKeys = config.SigningKeys;

However this gives me the following error when running/triggered in Azure:

Method not found: 'System.Collections.Generic.ICollection`1<Microsoft.IdentityModel.Tokens.SecurityKey> Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfiguration.get_SigningKeys()'.

What is the issue here? It builds just fine without warning or error...this is only when triggered in Azure...

Customer reported Investigate P1

Most helpful comment

I did have the same issue, but upgrading the nuget package to 5.4.0 (from 5.3.0) helped solving it. Maybe worth a try for the original poster.

All 3 comments

@erdmenchen can you provide us with a bit of additional detail on repro steps?

I did have the same issue, but upgrading the nuget package to 5.4.0 (from 5.3.0) helped solving it. Maybe worth a try for the original poster.

@erdmenchen @JoschaMetze I was able to get this to work.
Please reopen if there are still issues.

Was this page helpful?
0 / 5 - 0 ratings