I don't believe there is a REST API for Sharepoint 2010 out of the box. If possible, the SPServices jQuery-based library at https://github.com/sympmarc/SPServices can help you access SharePoint's SOAP interface.
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:
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 ...
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
I'll add on to Nadeem's answer by providing a test that I did.
Here are some files that I uploaded to sharepoint online:
https://xxx.sharepoint.com/Shared Documents/nasty chars/dang dude you got ().txt
https://xxx.sharepoint.com/Shared Documents/nasty chars/dang dude you got '' in the title.txt
https://xxx.sharepoint.com/Shared Documents/nasty chars/dang ...
You are getting back the actual users, just not their email address. You need to select Email, like:
_spPageContextInfo.webAbsoluteUrl + "/_api/web/sitegroups/getbyname('Open%20Source%20Tech%20Talk%20Members')/users?$select=Email"
This will get back a response like:
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:
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);
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, ...
You can use code like given below for Authentication:
using (var context = new ClientContext(webUrl))
context.Credentials = new SharePointOnlineCredentials(userName,password);
context.Load(context.Web, web => wweb.Title);
Console.WriteLine("Your site title is: " + context.Web.Title);
It looked like the data was structured wrong, I've broken it out into it's own variable so you can see the general look of how it should be.
In itemdata, the type has to be specific to the list it is going into SP.Data.<ListName>ListItem. It is also a good idea to get the request digest at the time of execution.
You can try something like this: ...
Thankyou Swapnil Lad.
I resolved this in the end with your advice.
I had tried giving full control to workflow App and using the App-Step method and it made no difference.
It was indeed a permissioning issue.
I, and my Leaver Colleague were both in the relevant Groups as Administrators and no one else has these permissions so had nothing to reference.
Change your header attribute "XML-RequestDigest" to "X-RequestDigest".
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.
Please read this article: Microsoft Flow – How to move SharePoint Online list items to folders. This is approach identical to @Lisa Chen's one, but implemented via MS Flow. (This is an option according to your question)
You also may attach Remote Event Receiver (RER) to the list, or subscribe web hook. But this is not REST/JSOM/Flow
You can achieve your requirement by creating SharePoint designer workflow.
Create SharePoint 2010 platform workflow on the list like the following(choose start workflow automatically when an item is created):
1.create folder with same name as Title of the item.
Add "Create List Item" action.
select current list.
Add Content type ID > select folder, ...