How to obtain an access token for On-premises SharePoint

Shankar, Bhukya 0 Reputation points

I have a SharePoint clientId and clientSecret. Is it possible to obtain an access token for On-premises SharePoint through a Windows service?

what should be the API end point to get the access token?

A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,047 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 32,646 Reputation points Microsoft Vendor

    Hi @Shankar, Bhukya,

    SharePoint Server is different with SharePoint Online, there is no tenant id for a SharePoint Server site. We are unable to get access token as SharePoint Online.

    As a workaround, we could use NTLM Authothorization to access SharePoint Rest api. You could refer to the steps in following issue similar with yours

    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.