I have some troubles with the sharepoint api and i hope to get some help here ;-)

We want to build an app to update sites and lists on a sharepoint website, but unfortunately a needed function is not working in graph. We want to insert/update items in a list. We noticed, that this issue isn't new: Graph API does not support to create link columns in a list or on github link-column in sharepoint lists. So we have to switch to the old sharepoint api instead of the graph api. But thats not the question right now;-).

I've already seen the link on stackoverflow insert-item-in-list-via-rest where's a description how to insert list items in sharepoint in c#.

The first step is to obain the X-RequestDigest-Cookie via an empty POST request. And this post-request is what my question is about:

I am wondering how to do this post request to get the X-RequestDigest-Cookie via Postman

I tried: POST

Into the URL field i put: myname.sharepoint.com/_api/contextinfo

The Headers i've set are:

Accept: application/json; odata=verbose

Content-type: application/json; odata=verbose


At least the client credentials should be added. But how to? I added my sharepoint username and password into the authorization field of postman, there i tried a few variants like basic, ntlm or api-key. But i always get an 401 unauthorized error. I don't know what i do wrong. Where have to be the client credentials in postman? Or do i have to use client_id and client_secret? :O Can anybody help me?

(The settings in the Azure-Portal should be sufficient. We gave the Sharepoint-API the same permissions like the graph-api)

Thanks for a reply!

1 Answer 1


You could follow this blog to get Digest value:https://www.c-sharpcorner.com/article/access-sharepoint-online-rest-api-via-postman-with-user-context/

XML needed:

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"



    <a:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</a:Action>


    <a:To s:mustUnderstand="1">https://login.microsoftonline.com/extSTS.srf</a:To>

    <o:Security s:mustUnderstand="1"

    <t:RequestSecurityToken xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust">

      <wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">




Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.