Questions tagged [sharepoint-rest-api]

Using the Representational State Transfer (REST) interface provided by SharePoint. SharePoint has multiple APIs based on technology sets. This tag should be used when the question is specific to SharePoint's REST API to differentiate from other SharePoint APIs and customizations.

You can perform basic create, read, update, and delete (CRUD) operations by using the Representational State Transfer (REST) interface provided by SharePoint.

The REST interface exposes all of the SharePoint entities and operations that are available in the other SharePoint client APIs. One advantage of using REST is that you don't have to add references to any SharePoint libraries or client assemblies. Instead, you make HTTP requests to the appropriate endpoints to retrieve or update SharePoint entities, such as webs, lists, and list items.

For more details on the SharePoint REST API, see
- https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-rest-endpoints
- https://learn.microsoft.com/en-us/sharepoint/dev/apis/sharepoint-rest-graph

see also: , ,

203 questions
0
votes
0 answers

How do I get a list of a user's SharePoint group memberships across a Microsoft tenant?

I have a list of users and for each I want to generate a list of all SharePoint groups that user is in, across the whole tenant. What is the best way to do this? So far I can list every site in the tenant and then check for group membership in each…
Jan Martin
  • 408
  • 3
  • 11
0
votes
1 answer

SharePoint: How to get a term set by column-id in C#?

I try to get all terms in a set that is being used in a SharePoint list column which is a managed metadata column. The Microsoft Graph API does not give any information about the term set in the ColumnDefinitions and the Microsoft REST API seems to…
0
votes
1 answer

jQuery Datatable Sharepoint list filter data by clicking on icons/badges

I have this code:
0
votes
1 answer

How to restrict SharePoint Rest API access to only a specific site's list?

I have followed a tutorial to setup a SharePoint Rest API : Link to the tutorial With my generated client i am trying to get a list's items and posting new items to an existing list. It is working flawlessly from postman however i realised i have…
user3551399
  • 93
  • 2
  • 11
0
votes
1 answer

Getting Token type is not allowed error when sending REST API request to SharePoint API from Postman

I have successfully obtained an access token, however, I am experiencing difficulty in retrieving files and folder requests. Please refer to the attached images for more information.API Request for getting access…
0
votes
2 answers

How to upload file to SharePoint Online using REST API and CURL

I've been combing through Microsoft's documentation on the REST API to manipulate files in our SharePoint Online document tree. I'm ALMOST to my solution but having an issue. I'm running CURL commands on a Linux server. And in the /tmp directory on…
0
votes
0 answers

Adding New Item to SharePoint List Using REST API with Button Click

I have been trying to get this function to work, adding new content to a SharePoint list with a button clicked. The below script looks correct but when I select the button it gives me an error, 'Bad Request' and provides me with the path going to…
TonyT
  • 407
  • 4
  • 19
0
votes
1 answer

Sharepoint Query returns no results for with >5000 items

When I go to a specific folder in Sharepoint, I hit an error that I have exceeded the view threshold of 5000 items. I created a new view to only show items when the ID < 5000, I am able to see the folder contents now. However, how do I apply a…
Bijan
  • 7,737
  • 18
  • 89
  • 149
0
votes
2 answers

What permission do I need on Azure AD application to read a folder in ShraePoint?

I have an app registered in Azure AD with the following approved permissions: Microsoft Graph: Files.ReadWrite.All, Sites.ReadWrite.All, Sites.Selected, User.Read and SharePoint: Sites.ReadWrite.All, Sites.Selected Yet a request to load a folder at…
THX-1138
  • 21,316
  • 26
  • 96
  • 160
0
votes
1 answer

SharePoint getbytitle rest api returns duplicate Id property

I am trying to get all folders for a SharePoint list using below REST api _api/web/lists/getbytitle(
0
votes
0 answers

Resolve Access to XMLHttpRequest has been blocked by CORS policy

I am using sprestlib to upload a file to sharepoint, for that I am getting Access to XMLHttpRequest "url" from origin 'http://127.0.0.1:5500' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect…
0
votes
0 answers

Get SharePoint item from document library based on custom metadata

I am storing metadata with my documents and folders in SharePoint. This metadata includes an itemid which is a unique identifier from the system it came from. Is there a way to retrieve the item from SharePoint using Graph API by specifying the…
0
votes
1 answer

Unable to render aspx files when uploaded to SharePoint programmatically

I am new to SharePoint. I have written a simple python script that basically connects to SharePoint and uploads files (aspx and other frontend files) from a folder on my local machine to a specific folder on SharePoint site. To facilitate the script…
0
votes
1 answer

set-sposite is working for individual sites but not in a loop

Hey Everyone so I am able to set the sharepoint sites sensitivity labels in my tenant by doing them individually using the following commands: # Get the label (required ExchangeOnlineManagement module) Connect-IPPSSession -userprincipalname…
0
votes
0 answers

Get any document version (including current) via Sharepoint REST API with a single URL

I want to get the metadata and file of many documents via REST API. The documents are stored in a document library. Requesting metadata and file can not be done transactionally via one REST request. So I request the metadata for document at a…