To get the list items using REST API you need to use the URL like below:
To get the List Item Count using REST API you need to use:
Working with lists and list items with REST
If you want to get all the users in your SharePoint site you can use :
Try using below endpoint to get the Site Members from Members group:
To get the specific property for user, you can add $select query as given below:
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, ...
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 ...
Consider the following scenario:
List A with columns:
Title (Single Line Text)
ColumnA (Single Line Text)
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:
try using the Value of your Microsoft.SharePoint.Client.ClientResult<System.IO.Stream>. See the docs for reference.
WordprocessingDocument wordprocessingDocument = WordprocessingDocument.Open(stream, true);
WordprocessingDocument wordprocessingDocument = WordprocessingDocument.Open(stream.Value, true);
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.
Change your header attribute "XML-RequestDigest" to "X-RequestDigest".