how to get access token for sharepoint server rest api

龙昊 王 20 Reputation points
2023-11-01T01:46:34.7466667+00:00

I try to get access token for sharepoint server rest api
followed this(https://www.c-sharpcorner.com/article/how-to-test-sharepoint-online-rest-apis-using-postman-tool/)and get access token successfully for sharepoint online account

but failed to get access token for sharepoint server account

in short, i need the access token to call rest api normallysharepoint online

User's image

Microsoft 365 and Office | SharePoint Server | For business
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2023-11-01T08:08:52.3433333+00:00

    Hi @龙昊 王,

    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

    https://sharepoint.stackexchange.com/questions/284483/token-based-authentication-in-sharepoint-2016


    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 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.