Tag Info

Hot answers tagged

5

Queries will be executed based on the logged in users context. The results will be security trimmed. Also you should note that there is no option to elevate privileges from Client Side. This was done to eliminate security risks. Talking about app's (which can use REST queries), we can elevate the permissions. But this permission is maximum limited to the ...


3

REST, JSOM run using the previleges of the current loggged in user


3

It does not seem possible to filter list items using FileSystemObjectType property in SharePoint 2013 REST. Option 1 But you could utilize the following REST query to return folders and associated list items: /_api/web/lists/Lists(guid'GUID')/rootFolder/Folders?$expand=ListItemAllFields JavaScript example var listTitle = "Documents"; var url = ...


3

When you use URL _api/web/lists/getbytitle('TestList')/items(1)?$select=FolderUrl You will get two properties d:Description d:Url So you don't need to expand <m:properties><d:FolderUrl m:type="SP.FieldUrlValue"><d:Description>Google ...


3

As said on Twitter. You could first create an empty element with a specific ID. Pass that ID with your ajax call, and once you retrieved the information from your ajax call, you could retrieve the empty element and pass the necessary information in it. This is probably the easiest and quickest way to achieve it.


2

As a workaround, you could fetch the information before the user gets to your list view and store it in sessionStorage... Make the calls to find out if your user is in whatever groups you're trying to look at, then put the result in the sessionStorage object with something like sessionStorage.isInMySpecialGroup = "true" // sessionStorage only wants strings ...


2

I suppose _vti_bin/ListData.svc and _vti_bin/client.svc (_api) endpoints have different logic for permission checks. I can reproduce your problem, while logged as a site admin I can access the list, but not as a normal user: _api/web/lists/getbytitle('User Information List') What I also have found in the result, is a new (third) link to that hidden ...


2

Use Datasheet-View and make Copy+Paste or this Powershell script: Add-PSSnapin Microsoft.Sharepoint.Powershell [System.reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") $site = new-object Microsoft.SharePoint.SPSite("SiteURL”) $web = Get-SPWeb -Identity siteURL $lista =$web.Lists["ListName"] $items = $lista.items foreach ($item in ...


2

SP.Site object exposes SP.Site.owner property to get or set the owner of the site collection. REST endpoint: http://<sitecollection>/<site>/_api/site/owner


2

How to retrieve document name using SharePoint REST Since FileRef contains file name, you could utilize the following query to return document names: Endpoint: /_api/web/lists/getByTitle('<list title>')/items?$select=FieldValuesAsText/FileRef&$expand=FieldValuesAsText Example Get documents (names) that have been created from 2014 year: ...


2

For listing item in a particular order you should use orderby in the URL var queryGet = "?filter=Title ne 'reply'&$top=10&$orderby=Created desc"


1

You can invoke following REST call from the Workflow http://your_sp_site.sharepoint.com/_api/web/siteusers and get the user in question (using filter) and get the PrincipalId into a variable. And use it as part of the actual REST call. http://siteurl/_api/web/siteusers?$select=Id,Title&$filter=substringof('\username', Title)


1

Isn't possible expand lookup via Rest Api. Only for user(column default) and field with atribute Deferred. But have solution for this: loop items and get all items and selecting only the SpeakersID _api/Web/Lists/GetByTitle('Topics')/items?$select=SpeakersId will return as show image below: but isn't suficient for get user info: Update(2): then you ...


1

Since you are trying to get items you should change the URL as follows /_api/Web/Lists/getByTitle('Contacts')/items


1

SP Foundation does not include the User Profile Service, as @Aveenav noted. Therefore you probably do not have access to the REST endpoints for that service. Instead you will have to use the user information list to get this information. This will require two requets: one to get the current user's id, the second to get the user's info that you want. ...


1

You can't quite impersonate over REST API since the code runs client-side and any user could capture the request and use it maliciously to impersonate the user for other operations. If you have a High-Trust (Provider Hosted) App SharePoint trusts who your signed token claims the user is, but even then, you shouldn't use it client side. You might try using ...


1

Mike's alternative is the easiest to implement. You can also implement a Web Service to do the required actions for you and lastly (and I guess what you really want), you can try to implement the calls listed in this article in successive HTTPSend activities. The JQuery version of the REST calls are listed below. // Change placeholder values before you ...


1

Try this var theData = { "propertiesForUser": { "__metadata": { "type": "SP.UserProfiles.UserProfilePropertiesForUser" }, "accountName": "domain\username", "propertyNames": ["CompanyNumber"] } }; var requestHeaders = { "Accept": "application/json;odata=verbose", "X-RequestDigest": jQuery("#__REQUESTDIGEST").val() }; ...


1

Use two quotes. That is for 'aaa'aaa' use 'aaa''aaa'


1

I came across this scenario a little while back. If i'm not mistaken, I think you will need to 'create' an App Web as a proxy for your REST calls. You also need to alter the AppManifest.xml to add the following entry: <Internal AllowedRemoteHostUrl="~remoteAppUrl"/> in place of <RemoteWebApplication ClientId="*" /> However, this will also ...


1

You can loop using $.each(data.d.results, function (index, task) { for(i = 0; i < task.Status.length; i++) alert(task.Status[i]); });


1

It seems there is no straightforward way to distinguish when using SharePoint 2010 REST Inteface (listdata.svc). You could consider the following solutions that demonstrate how to retrieve Library names Option 1 It consists of: perform request to /_vti_bin/listdata.svc/$metadata endpoint retrieve list/library name from EntitySet element Name attribute ...


1

SharePoint 2010 REST Interface expects the following format for the Date column: /_vti_bin/listdata.svc/ListName?$filter=Modified gt datetime'YYYY-MM-DDT12:00:00Z' JavaScript example var listTitle = "Requests"; var minDate = getMinDate(); var endpointUrl = "/_vti_bin/listdata.svc/" + listTitle + "?$filter=Modified gt datetime'" + minDate.toISOString() + ...


1

It does not seem possible to retrieve Order field using SharePoint 2010 REST Interface. As an alternative approach you could leverage SharePoint Web Services, in particular Lists.GetListItems Method to return list items based on the specified query The following example demonstrates how to retrieve ordered list items using SPServices library: var ...



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