Why I can't set scope Domain.ReadWrite.All
for url like:
does not work.
works.
It works also for directory.readwrite.all
and any other, but does not work for domain.readwrite.all
. Why so?
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