How to grant permissions to a custom-developed application
If you want to grant consent preemptively on your app or are running into an error that you have not consented to an app, try these steps below.
How to perform Admin Consent for your application
This has the effect of granting consent to the application for all users in your organization.
Navigate to the App Registrations blade as a global administrator, then select the app.
Select Required Permissions, and finally hit the Grant Permissions button at the top of the blade.
Alternatively, you can construct a request to login.microsoftonline.com with your app configs and append on &prompt=admin_consent. After signing in with admin credentials, the app has been granted consent for all users.
How to force User Consent for your application
- Append onto auth requests &prompt=consent which require end users to consent each time they authenticate.