How to Read a SharePoint List Using .NET 8 with MFA Authentication

Artillis Prado 0 Reputation points
2024-07-23T21:09:52.9366667+00:00

System.Net.WebException: 'The remote server returned an error: (403) FORBIDDEN.' I am using .NET 8, and I've already tried with GetACSAppOnlyContext but it wouldn't work because I need to access more than 5 SharePoint sites simultaneously. There was an error in CC.ExecuteQuery();

'The remote server returned an error: (403) FORBIDDEN.' ao usar ClientContext com NetworkCredential

https://learn.microsoft.com/en-us/answers/questions/1822568/how-to-read-a-sharepoint-list-using-net-8

I wanted to know if there is a new method that works. I have tried several methods and all are giving errors.

Libraries I tested:

  • TTCUE.NetCore.SharepointOnline.CSOM
  • PnP.Framework

I am looking for a solution that works with .NET 8 to read SharePoint lists and access more than 5 different SharePoint sites.
User's image

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,641 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,273 questions
C#
C#
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.
10,640 questions
0 comments No comments
{count} votes