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
3

Here is a demo for your reference, We access SharePoint online and use REST API to upload a file in JAVA. 1.Get the security token from Microsoft authentication portal: public String receiveSecurityToken() throws TransformerException, URISyntaxException { RequestEntity<String> requestEntity = new RequestEntity<>(...


1

Microsoft Graph documentation says the following filter expression could be utilized to list all root-level site collections: siteCollection/root ne null But unfortunately i have not managed to get it working against V1 endpoint. As a workaround you could consider to filter root-level site collections on the client side, here is C# example (utilizes ...


1

I have not tried the Java client. But I can successfully issue the same request with the HttpClient class in the .NET framework. Make sure the cookie has the format: SPOIDCRL=77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48... Also, you do not need to include the X-FORMS_BASED_AUTH_ACCEPTED header.


1

I solved my question so I am posting an answer. What I first did was enable Document ID feature for SharePoint. We need to go to Site Settings and under Site Collection Administration > Site collection features, we need to activate Document Id service. A scheduled job generally assigns document ids to all document existing in SharePoint. Next we can ...


1

Assuming you knew that you're authentication is working, then you might want to look into the new Rest endpoints of SharePoint online. Here's a reference: https://msdn.microsoft.com/en-us/library/office/jj860569.aspx The /_vti_bin/ListData.svc endpoint still exists but I think it's deprecated. The new rest endpoint follows the odata standards. Give a call ...


1

I guess one option is using JSON where you can access lists and items with calls like https://company.sharepoint.com/sites/ourSite/_api/web/lists/getbytitle('ourList')/items Where company is your tenant name and ourSite is your site collection (if not the root SC) and ourList is the list you're trying to get More to read: Complete basic operations using ...


1

Since Excel Services in SharePoint 2013/Online supports supports OData, the following examples demonstrate how to retrieve table content: https://contoso.sharepoint.com/_vti_bin/ExcelRest.aspx/Documents/ciscoexpo.xlsx/OData/CiscoSalesTable get all table data https://contoso.sharepoint.com/_vti_bin/ExcelRest.aspx/Documents/ciscoexpo.xlsx/OData/...


1

You can do something similar as below String req = "http://sp2k13/sites/ifsp/_api/Web/Folders/add('LibraryName/FolderName')" NTCredentials credentials = new NTCredentials(UserName, Password, "JAVA-MACHINE-NAME", "DOMAIN"); HttpClient httpClient = new HttpClient(); httpClient.getState().setCredentials(AuthScope.ANY, credentials); httpClient.getParams()....


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