-1

We build an application using Microsoft graph api's. We register app using our personal account for authentication in azure portal. All things are working perfectly when user authenticate using his personal login credential. But when user use their organizational account for authentication e.g "kaz@deltaforcegroup.co.uk" then it authenticate but it gives an error

enter image description here

how can we resolve this issue? which permissions we have to add for avoid this dialogue box?

James Z
  • 12,209
  • 10
  • 24
  • 44
amir tariq
  • 35
  • 1
  • 7

1 Answers1

1

To resolve this issue for Need admin approval Make sure to allow user consent for application

Sign into the Azure portal as a Global Administrator ->Enterprise applications -> Consent and permissions under security -> user consent setting -> allow as below and save

enter image description here

> [AADSTS65001: The user or administrator has not consented to use the application with ID

This issue frequently happens when you failed to grant admin permission to the scope, please check few workarounds:

In your Azure Portal -> Azure AD-> App Registrations -> Your App -> Expose an API ->Try to add application ID URI -> Add scope and client application as below enter image description here

After adding expose an Api. Try to add API permission to access your app In your azure portal -> Api permission under manage -> add permission ->select MY APIS -> select your app -> add permission ->make sure to grant admin consent like below

enter image description here enter image description here

Please check this Reference: resolving-need-admin-approval-error and similar SO thread by carl zhao

Imran
  • 3,875
  • 2
  • 3
  • 12
  • i had applied all of these but which permission we should add to access data of authenticate user for example you add IMR_key permission. In my case which permission i should add? – amir tariq Aug 29 '22 at 12:00
  • You can [grant admin consent](https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/grant-admin-consent) to whole tenant using admin consent URL – Imran Aug 29 '22 at 12:21
  • kindly tell me one thing that can we make an app on azure portal using personal account? – amir tariq Aug 29 '22 at 13:47
  • Yes, we can create an app in personal account – Imran Aug 29 '22 at 15:08
  • i have done all of thing which you mention above but issue is same – amir tariq Aug 30 '22 at 12:27
  • Please check this [reference](https://learn.microsoft.com/en-us/answers/questions/571628/aadsts65001-the-user-or-administrator-has-not-cons-1.html) make sure to grant admin – Imran Aug 30 '22 at 12:31