Have you run into the cryptical “AADSTS50059: No tenant-identifying information found in either the request or implied by any provided credentials.” error? I have. This post will tell you how to fix it.
How to fix AADSTS50059?
Request Id: <guid>
Correlation Id: <guid>
Message: AADSTS50059: No tenant-identifying information found in either the request or implied by any provided credentials.
Okay – so the error claims Azure AD fails to recognize your tenant, as the request or provided credentials didn’t provide that. But is that even true?
The URL of the login page will look something like this:
So.. Wait a minute. The log-in url actually has all the info – what’s wrong, then?
The issue is, that you’ve already got login information on your machine – just not the correct one for this tenant! It’s all cached in the Local Storage.
Solution: Remove everything related to ADAL from Local Storage
ADAL login, when successful, caches the login info into your browser’s local storage. That’s convenient, as it eliminates the need to log in again anytime soon, but in a situation where you’ll be authenticating against multiple Azure AD instances (such as when you’re switching between different SharePoint tenants running code against Graph API), it’ll mess up the authentication. You’ll be trying to use the wrong tenant’s info automatically – and there’s very little you can do about it by default!
The solution is simple – you’ll just need to clear the browser’s local storage. Below, I’m showing what to remove in case you’re using Google Chrome. You’ll need to hit F12 to open developer tools, browse to “Application” tab, and then find your tenant from the “Local Storage” -section.
After removing all the storage entries for ADAL, refresh the page that threw the error before, and you should be greeted with a fresh, neat login screen!
You should be good!
Latest posts by Antti K. Koskela (see all)
- A cautionary tale of relying on the automatic backup procedure in SharePoint Online - May 21, 2018
- How to fix Twitter embed in SharePoint - May 18, 2018
- Fixing an unhandled exception about StructureMap configuration failing (messed up assembly bindings) - May 17, 2018
- How to fix AADSTS50059: No tenant-identifying information found in either the request or implied by any provided credentials. - May 14, 2018