Why do we need NetworkCredential while targeting OnPremise via CSOM.

ASR 671 Reputation points
2021-11-03T07:03:04.983+00:00

Why do we need NetworkCredential while targeting OnPremise via CSOM.. Can't we just use SharePointOnlineCredentials which we are using to target SPOnline or something common which can work for both online and onpremise.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,694 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,575 questions
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 31,606 Reputation points Microsoft Vendor
    2021-11-04T02:40:15.417+00:00

    Hi @ASR ,
    SharePoint Online and SharePoint On-premise based on different authentication methods. So we can't use same function to access both SharePoint Online and SharePoint On-premise.
    Please refer to the following documents
    https://learn.microsoft.com/en-us/sharepoint/security-for-sharepoint-server/authentication-overview
    https://learn.microsoft.com/en-us/sharepoint/authentication


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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

0 additional answers

Sort by: Most helpful