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

Hosek, Andrew 6 Reputation points

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.

A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,135 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,930 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,557 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Duane Arnold 3,221 Reputation points

    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.

    0 comments No comments

  2. MichaelHan-MSFT 17,996 Reputation points

    Hello @Hosek, Andrew ,

    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:

    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.

    0 comments No comments