Scope 'Sites.Selected' doesn't exist
Describe the bug Hello!
I'm trying to update our current application to use the new Graph 'Sites.Selected' permission scope instead of the 'Sites.ReadWrite.All' which we are using now. I followed instructions in the new blog post: https://developer.microsoft.com/en-us/sharepoint/blogs/controlling-app-access-on-specific-sharepoint-site-collections/
I added the new scope to app registration in Azure AD and granted the admin consent. Then used Graph explorer to add permissions in the site, where I intend to use them. In the .net application, I'm trying to use app.AcquireTokenInteractive(scopes).ExecuteAsync() command to get access token, where scopes is an array with one element - "Sites.Selected".
The issue is that when I login to the interactive window, I get an error, that this scope doesn't exist: AADSTS650053: The application 'X' asked for scope 'Sites.Selected' that doesn't exist on the resource 'X'. Contact the app vendor.
Things I have also tried:
- Using app.AcquireTokenWithDeviceCode flow
- Specifying full scope name: "https://graph.microsoft.com/Sites.Selected"
To Reproduce Steps to reproduce the behavior:
- Register an app in Azure AD with "Sites.Selected" Graph API permissions
- Use the following code to get access token
string[] scopes = new string[] {"Sites.Selected" };
var result = await app.AcquireTokenInteractive(scopes).ExecuteAsync();
Expected behavior Access token is granted.
Screenshots

Desktop (please complete the following information):
- OS: Windows 10
- Microsoft.Graph.Core version - 1.24.0
- MSAL.NET version - 4.27.0 AB#8282
Hey, @mbijei,
It looks like the permission is listed here as an application permission.
This therefore means that after enabling the permission on the azure portal, the .net app should only request for the following scope.
https://graph.microsoft.com/.default
Your code should therefore look something like this
string[] scopes = new string[] {"https://graph.microsoft.com/.default" };
var result = await app.AcquireTokenInteractive(scopes).ExecuteAsync();
You can read more about token acquisitions for apps without users here.
Hello,
Worked like a charm, thank you!
Glad to hear it!