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

Hot answers tagged

4

To get the list items using REST API you need to use the URL like below: http://sitename/_api/web/lists/getbytitle('List Name')/items To get the List Item Count using REST API you need to use: http://sitename/_api/web/lists/getbytitle('List Name')?$select=ItemCount Reference: Working with lists and list items with REST


4

If you want to get all the users in your SharePoint site you can use : /_api/web/siteusers? Update: Try using below endpoint to get the Site Members from Members group: _api/Web/SiteGroups/GetByName('SiteName Members')/users To get the specific property for user, you can add $select query as given below: _api/Web/SiteGroups/GetByName('SiteName Members')...


2

If you just want to authenticate as yourself, as in the user who is executing the code, you can pass default credentials with: request.UseDefaultCredentials = true; Ganesh's answer works fine for SharePoint online using CSOM, but since you're on 2019 and using HttpWebRequest, if you want to authenticate as someone other than the user executing the code, ...


2

That is because users get new IDs on each Site Collections. A user might have ID 173 on one Site Collection but ID 46095 on another. If you have sites located at the /sites managed path, then that is a new Site Collection and not a sub site, thus the user might have another ID. To understand why there is changes in user ID you should know something ...


1

Consider the following scenario: List A with columns: Title (Single Line Text) ColumnA (Single Line Text) ColumnB (Choice) and List B with columns: Title (Single line of Text) ColumnOne (Single line of Text) ColumnX (Lookup From List A, column A mapped) So the REST Query for List B would be: https://<site url>/_api/web/lists/getbytitle('ListB')/...


1

try using the Value of your Microsoft.SharePoint.Client.ClientResult<System.IO.Stream>. See the docs for reference. So.. Change: WordprocessingDocument wordprocessingDocument = WordprocessingDocument.Open(stream, true); to WordprocessingDocument wordprocessingDocument = WordprocessingDocument.Open(stream.Value, true);


1

Changing as below returned desired results. var xuser = data.d.results[0].Id;


1

you can use SPFx People Picker (version 11+) which was released recently at https://sharepoint.github.io/sp-dev-fx-controls-react/controls/PeoplePicker/ . Basically, this control will allow you to pick any users in all trusted domains in SharePoint Online.


1

Change your header attribute "XML-RequestDigest" to "X-RequestDigest". Reference: https://docs.microsoft.com/pt-br/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest#working-with-lists-by-using-rest


Only top voted, non community-wiki answers of a minimum length are eligible