question

HosekAndrew-7411 avatar image
0 Votes"
HosekAndrew-7411 asked MichaelHan-MSFT answered

Sharepoint CSOM .NETCore: Many queries coming back as Access Denied

Suddenly today many tasks that we use daily are erroring out with the message:

Access denied. You do not have permission to perform this action or access this resource.

This is using CSOM on .NETCore 3.1.

Some examples of the tasks that aren't working are changing the title of a site, getting alerts from a user on a site, creating a subsite, and I'm guessing there are more.

I tried the same exact tasks with the same user using CSOM on .Net Framework 4.7 with no issues, so it seems like its only an issue with .NETCore. I have only tried on 3.1 though.

dotnet-csharpoffice-sharepoint-onlineoffice-sharepoint-server-development
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DuaneArnold-0443 avatar image
0 Votes"
DuaneArnold-0443 answered DuaneArnold-0443 edited

If you're getting an 'access denied' it has something to do with the permissions the user account has when using a program that is being denied access to resources.

On the most recent Windows O/S(s), a user admin account is only a standard user with UAC enabled. You have to allow UAC to escalate user account privilege's to Admin.

Or where the resource is located, like on another machine, the user account being presented by the program to access the resource doesn't have the permissions.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MichaelHan-MSFT avatar image
0 Votes"
MichaelHan-MSFT answered

Hello @HosekAndrew-7411 ,

I did a test on my end, SharePoint CSOM works fine on my end with .Net Core.

How do you authenticate to SharePoint in .NET Core? You need to use modern authentication with CSOM for .NET Standard. More details are here: https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/using-csom-for-dotnet-standard

If you are using app for authentication, could it be that the app expires?


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.