© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
1 reply
AAA

❔ Sharepoint CSOM API Scopes on Azure AD

I have the follwoing permissions on my API.
In winforms im requesting these scopes:
"User.Read", "Files.ReadWrite.All", "Sites.ReadWrite.All", "Calendars.Read", "Sites.Manage.All"
"User.Read", "Files.ReadWrite.All", "Sites.ReadWrite.All", "Calendars.Read", "Sites.Manage.All"

my client app looks like this :
myPublicClientApplication = PublicClientApplicationBuilder.Create("clientId").WithAuthority("https://login.microsoftonline.com/{tenantid}/oauth2/token").WithDefaultRedirectUri()
                            .WithBroker(new BrokerOptions(BrokerOptions.OperatingSystems.Windows))
                            .Build();
myPublicClientApplication = PublicClientApplicationBuilder.Create("clientId").WithAuthority("https://login.microsoftonline.com/{tenantid}/oauth2/token").WithDefaultRedirectUri()
                            .WithBroker(new BrokerOptions(BrokerOptions.OperatingSystems.Windows))
                            .Build();

this silently logs the user in and it works perfectly fine but when I add "AllSites.Manage" scope to the requesting scopes, i get an error saying it doesn't exsit on the resource
Screenshot_2023-06-13_133740.png
Screenshot_2023-06-13_134748.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

SharePoint CSOM
C#CC# / help
3w ago
Azure AD sign out.
C#CC# / help
3y ago
I need help with SharePoint CSOM and Managed Metadata columns please
C#CC# / help
15mo ago
❔ Calling an Azure AD protected Web API endpoint from an Azure AD protected Web App [.NET 7]
C#CC# / help
3y ago