REST Api returns empty data in Postman

gokulnath palani 126 Reputation points
2021-08-16T11:32:41.167+00:00

Hi all,

I am using the SharePoint REST API to get the data, but it returns the empty data in Postman. When I put the same url in browser there I can see number of items were returned.

123633-image.png

Microsoft 365 and Office SharePoint Development
Microsoft 365 and Office SharePoint For business Windows
Microsoft Partner Center API
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2021-08-17T08:47:50.68+00:00

    Hi @gokulnath palani ,
    I can reproduce your issue when I get something wrong in App's Permission Request XML.
    Please try following code to reset the App's Permission Request XML in the link:
    https://YourSharePointOnlineSiteUrl/_layouts/15/appinv.aspx

    <AppPermissionRequests AllowAppOnlyPolicy="true">  
    <AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl" />  
    </AppPermissionRequests>  
    

    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.

    1 person found this answer helpful.

  2. sadomovalex 3,636 Reputation points
    2021-08-16T15:37:16.303+00:00

    using of SP REST Api in Postman usually requires authentication. You may add cookies to your Postman requests by copying them from browser: in browser open dev tools F12 > Network tab and refresh the page. After that copy cookies from request headers and past them to Postman request settings

    0 comments No comments

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.