I am trying to access the sharepoint data via rest api call, but i am getting an Access Denied error.

First i want to know how to generate the "Access Token"?

Can anyone help me..

  • Pleaes provide some more detail, and a sample of the code you are using. – lazoDev Apr 19 '18 at 17:06

How did you access the SharePoint data by REST API?

If you receive the “Access denied” error, you could check if the user has the enough permission on the list or library.

And to generate Access Token in SharePoint online, you could refer to the articles below.

Access SharePoint Online using Postman.

Create and use access tokens in provider-hosted high-trust SharePoint Add-ins.

| improve this answer | |
  • Thanks for the answer.. Now I have generated "Access Token" by following the documentation and i am able to get the data of user names of a site. I got one requirement to get the all user names and their permissions. And I am very new to the SharePoint, Can you tell how to get the user's names and their permissions through Rest Api Call. – Manikanta Apr 23 '18 at 14:41
  • For getting the user names i have used the following Rest Api https://<sitename>.SharePoint.com/_api/web/siteusers – Manikanta Apr 23 '18 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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