Hello,
Welcome to Microsoft Q&A,
If the application is not pre-approved by the organization or if it’s running in a personal (non-enterprise) tenant, admin consent is mandatory if the scope has high-previlage access.
-
files.readwrite.all
Scope: This permission grants access to all files in the user's OneDrive, which is a high-privilege scope requiring admin approval.
Grant Admin Consent (If you have admin access)
- Log into Azure Portal: Azure Portal.
- Navigate to Microsoft Entra ID --> Enterprise Applications --> Your Application.
- Click Permissions under Security in the left-hand menu.
- Click Grant admin consent for <tenant name>.
- Confirm the action.
If you don't have admin access, construct and send the below URL for the admin to provide consent to the application.
https://login.microsoftonline.com/<tenant-id>/adminconsent?client_id=<client-id>
Please Upvote and accept the answer if it helps!