Started getting "com.auth0.jwk.SigningKeyNotFoundException: Cannot obtain jwks from" suddenly

Hi,

I have a JWT identity token signature verification java method for verifying the Azure id token. This was working till today and all of a sudden I am starting to get the exception “com.auth0.jwk.SigningKeyNotFoundException: Cannot obtain jwks from url https://login.microsoftonline.com/{tenantId}/discovery/v2.0/keys

This exception is thrown when retrieving the JWK from JwkProvider. The exact statement where it fails is

Jwk jwkOfToken = jwkProvider.get(kid);

I have been reading the posts in the community and noticed a similar issue via this post in Nov’19

Can anyone please look into this issue?

Hi We are also getting the following error whil using the GitHub - auth0/jwks-rsa-java example
JwkProvider provider = new UrlJwkProvider(“https://samples.auth0.com/”);
Jwk jwk = provider.get(“{kid of the signing key}”);

we are getting the following error.

Caused by: java.io.FileNotFoundException: https://login.microsoftonline.com/tenantid/discovery/v2.0/keys/.well-known/jwks.json
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1896)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
at com.auth0.jwk.UrlJwkProvider.getJwks(UrlJwkProvider.java:135)
… 58 more

we tried and it fails always when you retrieve the key.