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...
@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.
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.