I got the error when I was trying to get an access key for one of our APIs. "AADSTS65001: The user or administrator has not consented to use the application with ID '{GUID}'
First of I was trying to prompt=consent during login, thinking that I had new consents that weren't prompted during login. And I got the following error. "AADSTS65005: The application '{GUID}' asked for permissions to access a resource that has been removed or is no longer available. Contact the app vendor." I removed prompt=consent and started fiddling with the permissions in Azure and now I was stuck on the same error.
I changed everything back as it was but I am still getting the error, however this only happens on my user. Everyone else can still login without problems.
So my problem is actually in two parts:
The first error when trying to get access token for the API. Somehow I need to prompt the user with consent but I am using adal.js which uses a silent retrieval of the keys using an invisible iframe. I would like the consent to be when the user logs into the web app. Is this possible?
My user can't log in to our web app anymore. Everyone else can, anyone encountered this before?
The product is a SPA Web App written in React and we use adal.js (adal-vanilla) as a library for authentication to azure ad.
Update Finally got some stuff working. Not all the way but atleast it's a start.
- The problem on this is that users registered on other tenants (this is a multi tenant app) don't get the consent to use the API. These users get the error. However I registered a user on the same tenant and everything worked as intended.
- Problem two got solved by removing all the permissions and adding them one by one and testing inbetween. Somehow this worked after two-three tries.
The problem now is that users from other tenants don't get consent prompt to access the API.