This post was most recently updated on August 10th, 2020.Reading Time: 3 minutes.
This article will explain to you how to fix the error “AADSTS700054”
Another day, another unsuccessful authentication attempt, and another cool error code. This one I encountered when building a little POC that was supposed to authenticate against Graph API.
When developing your client-side solution (an SPFx webpart, React app, ASP.NET MVC application with some client-side components… Your pick!), you run into this error when your code tries to authenticate against Azure AD:
AADSTS700054: response_type 'id_token' is not enabled for the application.
And nothing else, really. That’s all.
Not super descriptive, is it? Below, you can see a screenshot of such issue:
Your app’s authentication provider is currently not allowed to return a token that’s required for the OAuth2 implicit flow. This flow is a simplified authentication flow, where your successful authentication request will directly result in an access token to be returned to your app.
Since your app is requesting the token, but the authentication provider can’t return it, an error is thrown. There’s a couple of different switches, that might be stopping the token from being returned. Let’s take a look, then!
There’s 2 steps you need to take to fix this issue. Luckily, as long as you have access to the app registrations, both steps are simple.
First of all, consider whether you need the implicit flow or not, based on what I wrote earlier. Maybe you don’t – and you should be using something else instead.
If you do, proceed with the steps below.
Step 1: Enable the implicit authentication flow
You’ll need to make a simple app manifest change to enable the authentication with the implicit flow in the first place.
See the article below for instructions on how to enable the implicit authentication flow for your app:
When that’s done, and if you still have issues, see below as well:
Step 2: enable returning the tokens
Okay – next we need to make sure our registered app is allowed to return those tokens when requested. The configuration page on AAD says the following about the implicit flow (implicit grant):
To enable the implicit grant flow, select the tokens you would like to be issued by the authorization endpoint…
Okay, so that means we’ll just need to navigate to the following path:
Azure Portal > Azure Active Directory > App Registrations > Authentication > Advanced Settings > Implicit grant
Enable “ID tokens” as shown below.
Click Save, head back to your app – it should work now!
All good now? Let me know in the comments section below!
- How to fix “System.IO.FileSystem: Could not find a part of the path \AppData\Local\AzureFunctionsTools\Releases\3.17.0\workers. Value cannot be null. (Parameter ‘provider’)” when running Azure Functions locally? - January 12, 2021
- How to nuke the Identity Cache in Visual Studio? - January 11, 2021
- Fixing unexpected Microsoft.AspNetCore package errors after a dependency update - January 6, 2021