Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sharepoint-rest-api]

Using the Representational State Transfer (REST) interface provided by SharePoint

0
votes
1answer
11 views

SharePoint Online Search

How could I filter by range in a managed property of type number in a sharepoint search? I'm using pnp-js-core Thanks so much.
0
votes
0answers
12 views

Authenticating to SharePoint from fiddler/postman fails with 401

I am trying to follow the guidance in many articles, one by Fabian williams, on how to make queries from Fiddler or Postman, but I keep getting 401 unauthorized. I have SharePoint on prem 2016, with ...
0
votes
1answer
25 views

Fetch list of lists based on content type by REST Api

I need to display 2 dropdowns to user, first populated with all subsites in a site collection that have at least one discussion list; and second dropdown with all the discussion lists available in a ...
2
votes
1answer
437 views

SP Online getFolderByServerRelativeUrl REST Api - Bug or feature?

I came across this yesterday, and im curious if its intentional or its a bug. So, I have an empty doc lib Docs. I wanted to check if a folder (lets say 2017) exists in the doc lib. So i called the ...
0
votes
0answers
18 views

Is it possible to access sharepoint without security_token?

I am trying to call sharepoint rest api something like /_api/search/query?querytext= but let's say if I dont have login information to send a post request to https://login.microsoftonline.com/extSTS....
1
vote
2answers
510 views

Update document library column value for given row ID

I'm trying to update the status column in a document library where the name is "sharepoint_test.csv" and I'm following this tutorial to do it. URL: POST:URL https://mycompany.sharepoint.com/...
0
votes
0answers
19 views

JavaScript use custom Content Type and Page Layout

I am creating a Site Page using JavaScript. After some research, i was able to achieve that with the following code: function createPage(webUrl,listTitle,fileName,success, failure) { getListUrl(...
1
vote
1answer
25 views

Client to Server Authentication for SharePoint Online REST API

I am looking for answers if SharePoint online supports client-to-server authentication. My use case is to access Sharepoint REST API via pure JS with no server involved.
-3
votes
1answer
327 views

SharePoint REST API unread/mention count

I like to retrieve unread/mention count using REST API but I do not know how to begin? Can anyone tell me how should I begin and do I need any credentials when consuming the REST service?
0
votes
1answer
754 views

Share document to multiple users using REST api in SharePoint 2013

I am using SharePoint 2013 rest api. I want to share SharePoint document among multiple users Here is my rest endpoint https://XXXXXX.sharepoint.com/sites/XXXX-Test-SharePoint/_api/web/Lists(%27%...
0
votes
3answers
53 views

Get List Item ID for file in Document Library

I've got a document library which has folders in it. I can get a given folder and iterate through the documents in the folder via REST just fine. What I need to do is get some of the list item ...
0
votes
1answer
796 views

SharePoint 2013 REST API Filter hidden Fields

I have a little Problem. I'm trying to do the following. There is a Field on SharePoint List items called HasUniqueRoleAssignments that is hidden on a standard REST call. If I put it in the select ...
0
votes
2answers
25 views

How to get version history of item using REST

Very new to SharePoint so I am sure this is a newbie question... I did look at the forums. Here is the command I am using: https://Server/Site/_api/lists/getbytitle('Equipment%20and%20Inventory')/...
0
votes
1answer
24 views

REST API filter by a “BusinessData” field

I have a query that brings the contents of a list based on a query like this: https://myserver.com/LibraryABC/_api/lists/getbytitle('MyList')/items?$select=*,FileLeafRef&$filter=(MyField eq '...
0
votes
1answer
26 views

Rest API populating multiple people picker - populates my user AND “SPO Crawler”

Ok so this is a weird one. I'm trying to populate a multiple people field like this -> UsersToNotify = { "results": [10,50,563]}; Lets say 10 is my id. After i create the item through rest (create, ...
0
votes
1answer
24 views

Add attachment to a list item using REST API

I have an infopath form that uses a custom (html) form submit button. The click event of the submit button adds the item to the list using REST API. The only issue is that when the user uploads an ...
0
votes
0answers
30 views

Starting SharePoint 2013 workflow using REST from another workflow fails the first time but works on retry

I have two SP 2013 workflows. One (WF1) does a number of things, but at the end of WF1, I'm calling another SP 2013 workflow (WF2) using REST. WF1 runs both on create and change and conditionally ...
0
votes
1answer
24 views

Search/REST API only showing all results to Farm admin

I want to retrieve all the library items of a content type "Prod Request". I am using REST API. Here is my query: $.ajax({ url: https://mysite.domain.com/_api/search/query?...
0
votes
0answers
31 views

Anything wrong with this Search REST API Query?

Trying this: https://domain/_api/search/query/?querytext=%27TestSearchString%27&querytemplate=%27 {searchTerms}%20ListID:00000000-0000-0000-0000-000000000000%27& selectProperties=%...
0
votes
0answers
22 views

Get data from a different site collection using ajax - Sharepoint online

I am trying to get some data, into a webpart in SiteA, from a document library in SiteB using an ajax call. When I added my code to a content editor it worked properly. However when added it to the ...
0
votes
0answers
20 views

Getting the Item ID based on combination of two columns through Rest API

I have a small requirement where in I would like to get the item id based on combination of 2 columns. So I have two List which are List A List B Now I am getting two columns which are employee ...
3
votes
2answers
1k views

Insert multiple users and groups in a user field of a Sharepoint Online list using Pnp-Js-Core

How can I insert multiple users and groups in a user field of a Sharepoint Online list using Pnp-Js-Core? greetings and thanks.
1
vote
2answers
45 views

Change Sharepoint group setting using JSOM or REST

I am looking for JSOM or REST option to update SharePoint user group settings who can edit the membership for the group.
0
votes
2answers
43 views

Rest Api Code not working

I have a very weird problem that i am facing. So currently i have written a rest api code in regard to my requirement. Basically, this is what i am doing in the code. Getting Employee Names from a ...
0
votes
1answer
909 views

How do I add a managed property for a column on a list when I do not see a crawled property to map to?

I'm working with SharePoint 2013 Enterprise. I've taken over the management of another SharePoint setup created by the person that had my job before me. I want to be able to query against the search ...
0
votes
1answer
21 views

Search SiteGroups API not working when case sensitive

I'm using the API to search for sitegroups as below: "/_api/web/SiteGroups?$orderby 'Title'&$select=Id,Title,LoginName" + skiptop + "&$filter=startswith(Title,'" + value + "')" However, I ...
0
votes
2answers
48 views

How to retrieve Multi Value Lookup List REST Api Sharepint 2013

have 2 lists, I tried to retrieve the values ​​of lookup field (one or more values ​​from the Finance list (Title, Country (lookup field to the list Country column "Title" $("#Finance").autocomplete({...
0
votes
1answer
21 views

How do I use a specific view in Power Apps?

Arguably this is a PowerApps question as well, but I thought my SharePoint folks might have encountered this one. I am showing a SharePoint list in a PowerApp, let's call it 'Upcoming Events' and ...
2
votes
1answer
33 views

What are the alternatives to authenticate in SharePoint beyond AD to use the Rest API?

I am trying to consume via Rest the Ms Project API from a Node client, I was searching and found that it's possible to get an access token from the ACS (Azure Access Control) and use this in the rest ...
0
votes
1answer
20 views

Sharepoint REST API - How to Create InformationRightsManagementSettings

To create IRM settings using REST API, I am referring to document SP.InformationRightsManagementSettings object As per documentation, it suggest below REST endpoint to create new IRM POST http://<...
0
votes
1answer
30 views

Add an item to a SP list with a managed metadata column in SPFx webpart

I've a list in SPFx with a column type of Managed metadata. Now I'll add an item in that list with a web part. But how can I do this? import { TaxonomyPicker, IPickerTerm } from "@pnp/spfx-controls-...
1
vote
0answers
17 views

How to filter on a Edm.Double type using rest api?

I'm currently working on a small project where I need to query the Access Request list of a site, while this list is sort of hidden the REST api works perfectly (Mind you the title might be different ...
1
vote
1answer
39 views

.docx files uploaded to SharePoint through REST API being corrupted. Other file types okay

I have two ajax calls below. First to get the contents of a document on my server into an arraybuffer. Then a second call to a Flow to add the file contents into a new file on SharePoint. This works ...
0
votes
0answers
12 views

REST Query discrete size error

I have had a rest query running on my site for some time now however this morning it has suddenly stopped working. The query uses the SharePoint search rest api with a number of parameters. https://&...
1
vote
0answers
16 views

How to Grant permissions to domain groups in SharePoint site using REST?

I need to grant permissions to Domain Group in SharePoint site collection using REST. Is it possible? If Yes, please suggest how to do it.
1
vote
0answers
11 views

Refinement filter to look at the Title and Path properties with REST Search API

I have a POST search using the following select properties: Path,Title,Size,Author,Description,FileExtension,Rank,DocId,WorkId,ParentLink,FileType,ServerRedirectedEmbedURL,ServerRedirectedPreviewURL,...
1
vote
1answer
38 views

Using Sharepoint Search REST POST API: getting 403 error from HttpWebRequest

I am trying to use the SharePoint Search REST API to do a content search from my c# application. I have no problem using the GET method, but the POST method keeps returning a 403 forbidden error. ...
0
votes
0answers
26 views

List get does not return items

Beginner with sp js api here. $pnp.sp.crossDomainWeb(addinweb, hostweb).lists.getByTitle("Sites").items.get().then(function(result) { console.log(result); }); I can see it does ...
1
vote
1answer
40 views

How to fetch version history of list item and display in a list

I have requirement where I need to fetch the version history of each list item and display in a separate list where a specific column value has been changed. For Example: I have list named "Demo" and ...
0
votes
2answers
1k views

How to add the custom Data to calendar list in sharepoint 2013?

I created the Customs Form as a web part, In that form, there have Several Fields like Title, Location, Date and Time picker, Description, Images and URL. After Filling the Form, a user clicks publish ...
2
votes
1answer
1k views

Changing the owner of a group via REST API

I'm trying to change the owner of a group via the REST API. I'm working entirely within the host web, so no cross domain calls from the app web. If I run the below code, it succeeds and changes the ...
1
vote
1answer
20 views

Sharepoint client.PostAsync(“Url”, null) Gets 401 unauthorized error REST API Xamarin.Forms

I am developing a cross mobile app using Xamarin and I am trying to post some items to a SharePoint List. I have created a windows form app just to test the SharePoint Rest API and it is working good,...
1
vote
1answer
23 views

Filters result in “Expression not valid” - Sharepoint 2013 API

Here is the request: https://sub.domain.com/Stores/CrisisMgmt/_api/web/Lists/GetByTitle('StoreClosures')/Items$select=StoreRegion When I make a request without the filter, I get all this data just ...
0
votes
2answers
121 views

Send HTTP Request error in Flow (Invalid JSON)

I am creating a flow right now that will create pages every week. The thing is, im using the "Send an HTTP request to sharepoint" to create the pages. Below you can see that part: The problem is, ...
0
votes
1answer
25 views

Change approval status after insert item via Sharepoint REST API

I recently noticed that by modifying the column of an item in a list with active versioning, however much the item is approved, it changes the status to draft. When faced with this problem I decided ...
0
votes
1answer
950 views

SharePoint REST API CAML Query error : “Every two elements in an array and properties of an object must be separated by commas."

While quering with the CAML query in the SharePoint REST API throws following error. { "error": { "code": "-1, Microsoft.Data.OData.ODataException", "message": { "...
2
votes
1answer
38 views

Search API get team and communication sites

How do I search for Team Sites and Communication Sites using SharePoint Search REST API?
6
votes
3answers
4k views

Retrieve all sites and all subsites from the SharePoint REST API

Using the SharePoint Online REST API, I'm trying to retrieve a list of all sites and subsites. This API gives me all top level sites, but no subsites: https://{mycompany}.sharepoint.com/_api/search/...
0
votes
1answer
1k views

Access denied. You do not have permission to perform this action or access this resource. for getUserpermissions

I am trying to get permissions of user by consuming REST api from Java Client and after executing code . it shows Access denied. You do not have permission to perform this action or access this ...
1
vote
1answer
40 views

Remove an external user access for a Folder/Document in a Document Library Programatically

I have shared a folder/document to an external user (outside the organization) in SharePoint online doc library. An email to the new user is shared with One time passcode to access the file. Now, the ...