Rest Api for internal sharepoint

Schwartz Timothy J 1 Reputation point
2021-08-09T14:37:28.67+00:00

I've been trying to connect to our internal SharePoint 2016 using postman. I've generated an ID and Secret, but I am unable to generate an access token. When using the get http://share-internal.SITENAME.com/teams/TEAM/_vti_bin/client.svc/, instead of getting an authentication error like in the other examples online, I get some difficult to understand xml and the 200 OK. Is this an issue specific to internal sharepoint?

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
Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
316 questions
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 31,376 Reputation points Microsoft Vendor
    2021-08-10T05:50:55.307+00:00

    Hi @Schwartz Timothy J ,
    Since the way to access sharepoint 2016 is different from sharepoint online,take following steps:
    Step 1 – Get your SharePoint site’s FormDigest using Contextinfo call

    1. In Postman, the contextinfo endpoint URL for your SharePoint Site…something like: https://mySharePointSite/_api/contextinfo
    2. Set the Accept header: application/json;odata=verbose
    3. Set the html verb to POST
    4. Hit Send

    With Results:

    1. Copy the big string of characters inside the <d:FormDigestValue> ~~~ </d:FormDigestValue> tags

    Step 2 – Make your HTML GET Request (or POST if you’re posting)

    1. Enter your endpoint URL…something like: https://mySharePointSite/_api/web/lists/getbytitle(‘MyListName’)/items?$select=Title
    2. Set the Accept header: application/json;odata=verbose
    3. Set the HTML verb to GET (if you’re getting data. POST or PUT or whatever if you’re doing something else)
    4. Add the header X-RequestDigest and paste the FormDigestValue copied above into it
    5. Hit Send, and you should be good to go

    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.