1 Answers

1
votes

Domain.ReadWrite.All is an application scope (client credential flow, aka app-only) and you are trying to have a user consent to that scope in a delegated auth flow.

To use Domain.ReadWrite.All you would need to do admin consent using the admin consent endpoint like this:

GET https://login.microsoftonline.com/{tenant}/adminconsent ?client_id=6731de76-14a6-49ae-97bc-6eba6914391e &state=12345 &redirect_uri=https://localhost/myapp/permissions

Edited: updated to domain.readwrite.all