Use SharePoint Rest Services in Apps Of Access (Content App)
Hi,
I want to get Office 365 SharePoint lists, Add new items into list, Update existing items etc by using app for access. When I am trying to send REST call to SharePoint online (Office 365) It given error:
Fri Dec 05 2014 11:53:01 GMT+0530 (India Standard Time):RequestExecutor.OnMessage: Message.data={"command":"Query","postMessageId":"SP.RequestExecutor1","responseAvailable":false,"errorCode":-1005,"errorMessage":"There
is no trusted URLs configured for the app deployment."}.
Is there any way to achieve this. Is it actually possible to get or update SharePoint contents from an access app?
Please help :(
Thanks in Advance!
Neetu Tanwar Software Developer
Hi NeetuTanwar,
Thanks for posting in MSDN forum.
From the error message, it seem the issue is relative to SharePoint development.
Here some links may be helpful:
Solving cross-domain problems in apps for SharePoint
Guidelines for registering apps for SharePoint 2013
Can you reproduce the issue in a common web applicaiton? If yes, I also suggset that you reopen a new thread in
SharePoint 2013 - Development and Programming forum to get more effective response.
Regards & Fei
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Similar Messages
-
Role Assignment Discovery Issue for Files and Folders through Sharepoint REST services
To preface, I am a decided Sharepoint newbie in every sense. I am trying to use the Sharepoint REST services (Sharepoint 2013) to walk the folder and file structure of my Sharepoint server and, determine as I go, the Role Assignments (and subsequently
Permissions) on those folders and files. I'm using an Administrator credentials and I'm actually able to successfully do it but I've run into some caveats. All the caveats begin with this; when I'm examining a folder, for example:
/_api/Web/GetFolderByServerRelativeUrl('/sites/cmisdev/Development')/ListItemAllFields
I receive either an empty list or an error response doc when following the link supplied for ListItemAllFields. When following that kind of link for folders, I either get:
<d:ListItemAllFields
m:null="true"
/>
or an error response document that says "The object specified does not belong to a list." When I hit the /ListItemAllFields endpoint for files, I receive a response with a link for Role Assignments which subsequently also works and I get the
info I need. So, is this a bug? Why does the link returned from Sharepoint work for files and not folders? So, google, google, google, and I discover that there is another possible way to get at the Role Assignments (and that the object does, indeed, belong
to a list!).
If I know the Title (or the guid) of the folder in question, I can use the following endpoint:
/_api/Web/Lists/GetByTitle('Development')
If I use that endpoint, I get the information I would have expected to get from following /ListItemAllFields and the subsequent Role Assignments links all work and I get what I need. If there's a bug and this is how I have to work around it, that's fine
but I have yet to discover how to dynamically determine the Title of a given folder nor am I sure if all Titles are supposed to be unique within a given Sharepoint server. I'm assuming that the folder name as represented in the server relative URL and the
Title may be different and this is where my newbishness may start to shine if I'm misunderstanding what a "List" is supposed to be in Sharepoint. Anyway, I did find that I could use the Properties endpoint to perhaps get the Title, for example:
/_api/Web/GetFolderByServerRelativeUrl('/sites/cmisdev/Development')/Properties
gives me:
<d:vti_x005f_listtitle>Development</d:vti_x005f_listtitle>
whose value I assume I could then supply to the /GetByTitle endpoint and be golden. However, "vti_x005f_listtitle" just sounds a little too deep to be something I should be relying on but maybe that's kosher. That's part of what I'm trying to
find out. Also, if there is a way to use the Sharepoint REST API to discover the guid of a given object, then I could look it up in that way.
So, in summary:
1. Am I going about getting folder Role Assignment information in the wrong way? Based on the CSOM examples I've seen, I believe I'm doing it correctly and that the answer to #2 below is a resounding "Yes!" :)
2. Is it a bug if I'm not able to use /ListItemAllFields on folders using the server relative url?
3. If I'm supposed to use GetByTitle as a workaround, am I discovering that Title correctly through /Properties? Seems quite circuitous and awkward. Are Titles required to be unique throughout a given Sharepoint server?
4. If I'm supposed to use the guid, how can I use the REST interface to discover an object's guid? Once we get down to the Role Assignments and other links, the guid appears in those links but I don't know how to discover it independently if that's the
path I should use to get the data I described above.Upon further research, I'll answer my own question for the benefit of some other potential future newbie. The answer to question number 1 above is "Not exactly.". The server relative URLs I was using corresponded to lists (which are
returned as a collection through /_api/web/lists). I was treating them mentally like regular folders. That, coupled with the fact that accessing their data as I showed above returns a ListItemAllFields link, made me think that was the way to get
the Role Assignments just as I would for files and, as it turns out, "real" folders and sub-folders created under these lists. That was the other problem with thinking of these lists as regular folders. So, ListItemAllFields works on
all files and folders in a list. However, if you want Role Assignments for the lists themselves, you can keep track of the Titles and\or Guids from the /_api/web/lists that you're interested in (in my case, all non-hidden "document library"
type lists) and then access those Role Assignments as I discussed in questions 3 and 4 above. For example, from the /_api/web/lists collection from my test server, the "Development" document library Role Assignments are accessable via /_api/Web/Lists(guid'cd242eeb-aafa-4efa-aecc-9bbdf8e3d459')/RoleAssignments
or /_api/Web/Lists/GetByTitle('Development')/RoleAssignments. -
SharePoint REST service to add an exsiting site content type to a list/library
Trying to use SharePoint 2013 REST Service to add existing site content types to a list/library. Below MSDN article suggests that the POST method is available but does not say how to use it.
http://msdn.microsoft.com/en-us/library/office/jj246793%28v=office.15%29.aspx#postsyntax_htm
POST http://<sitecollection>/<site>/_api/web/lists(listid)/contenttypes/add(parameters)
How do we create the body for this rest call?Hi You need to use the addAvailableContentType method to attach a Existing Content Type to a list/Library.
Consider the below Sample. Take the Id of the Content Type and pass it.
the REST API URL is
http://<sitecollection>/<site>/_api/web/lists(listid)/contenttypes/addAvailableContentType(contentTypeId)
var siteUrl = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('Employees')/ContentTypes/AddAvailableContentType";
var call = jQuery.ajax({
url: siteUrl,
type: "POST",
data: JSON.stringify({
"contentTypeId": "0x0100E5EC1FE6D284A74A972A1776FFFE2DA0"
headers:
'accept': 'application/json;odata=verbose',
"content-type": "application/json;odata=verbose",
"X-RequestDigest": jQuery("#__REQUESTDIGEST").val()
call.done(function (data, textStatus, jqXHR) {
var message = jQuery("#message");
message.text("Added Content Type Successfully");
call.fail(function (data, errorcode, errormessage) {
alert("Could not enable content types: " + errormessage);
Here 0x0100E5EC1FE6D284A74A972A1776FFFE2DA0 is the Content Type Id of my existing Content type "Employees"
Ensure the AllowContentTypes is set to True for that List/Library
R.Mani | http://rmanimaran.wordpress.com -
Anyone Tried Using Sharepoint Web Services with BPEL?
I've tried using SharePoint Web Services with BPEL, I'm able set it to use the sharepoint web service as a partner link in orchestration, but when I try to compile the bpel file, I get a "error: null" on the compiler log for the *.bpel file.
Anyone have any success with using Sharepoint Web Services with BPEL?Hi,
Please refer the below article and browse code.
http://code.msdn.microsoft.com/Remote-Authentication-in-b7b6f43c
Thanks,
Srikanth -
I have Silverlight Out of Browser application which uses SharePoint Lists Service (Lists.asmx). Currently when I trying to communicate to SharePoint O365 site, I am getting the exception as below -
Communication Exception -
The remote server returned an error: NotFound.
How do I authenticate the user?
Amol C kadamHi,
You could follow below article to make sure your application configuration is correct.
http://www.silverlighthack.com/post/2011/07/19/Office-365-Using-Silverlight-in-the-SharePoint-Team-Site.aspx
Besides, below article could also give you some help:
http://www.silverlightshow.net/items/Silverlight-and-Sharepoint-2010-getting-started.aspx
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
We are trying to create folder & subfolder in a SharePoint document library using SharePoint default(dws) web service. Document library has unique permission as well as item level permission. It was working as expected. Once item count crosses
view threshold limit ( 5000) , create folder web method completes with an error and it creates a folder in SharePoint.
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dws="http://schemas.microsoft.com/sharepoint/soap/dws/">
<soapenv:Header/>
<soapenv:Body>
<dws:CreateFolder>
<!--Optional:-->
<dws:url>Shared Documents/VenTest02092015v1</dws:url>
</dws:CreateFolder>
</soapenv:Body>
</soapenv:Envelope>
Response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<CreateFolderResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/dws/">
<CreateFolderResult><Error ID="2">Failed</Error></CreateFolderResult>
</CreateFolderResponse>
</soap:Body>
</soap:Envelope>
While trying to create subfolder under the above created folder service throws an exception saying
FolderNotFound.
Though we are able to create subfolder from SharePoint UI successfully.
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dws="http://schemas.microsoft.com/sharepoint/soap/dws/">
<soapenv:Header/>
<soapenv:Body>
<dws:CreateFolder>
<!--Optional:-->
<dws:url>Shared Documents/VenTest02092015v1/REQ-1</dws:url>
</dws:CreateFolder>
</soapenv:Body>
</soapenv:Envelope>
Response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<CreateFolderResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/dws/">
<CreateFolderResult><Error ID="10">FolderNotFound</Error></CreateFolderResult>
</CreateFolderResponse>
</soap:Body>
</soap:Envelope>Yes, you're probably hitting the 5000 list item threshold (
http://sharepoint.stackexchange.com/questions/105937/overcoming-5000-file-document-library-limits ). I assume you can do it via the UI because you're probably logged in as an admin in which case, out of memory, the threshold is 20.000 items. You can extend
this limit, but you probably shouldn't.
Kind regards,
Margriet Bruggeman
Lois & Clark IT Services
web site: http://www.loisandclark.eu
blog: http://www.sharepointdragons.com -
I am trying to create a simple application to test WCF with WP8.1. I have created my service. Later I create my WP8.1 silver light application and I try to add a reference to my service Project. The problem is that I get an error that says that I have only
add reference to projects that are Windows pone 8.
I have read some solutions, but all of them are creating a WCF REST service, so my doubt if the WP8.1 applications only can connect to WCF REST services.
In this case, if this is true, it not would be better to use Web API instead of WCF?
Thanks so much.You can use any type of rest service with windows phone 8.1 because rest services can be called via the httpclient class. You dont need a service reference. Personally I prefer the web api but there is no reason you can not use a wcf rest service.
-
I was trying to view the Version History of a page from the SharePoint Designer 2013, I got the following error. "Versions cannot be accessed at this time, because the server is busy. Please try again later.
Whereas I can able to access the version history through browser, the issue only occurs in SharePoint Designer.
Thanks
RamkumarHi Ramkumar,
I understand that when you use SharePoint designer 2013 to check previous version of a page, it will pop up the error window. This is a known issue and here are two feasible workaround:
1.Use SharePoint designer 2010 to connect SharePoint 2013 site.
2.In SharePoint Designer 2013, use the Versions pane in the Page Summary view to access detailed version information of a file. You can access the Page Summary view by:
a. (Left) Clicking on a filename in the Site Pages list.
b. Select a file Site Pages list by clicking anywhere in the row (except the filename) and then clicking on “Page Settings” in the Site Pages.
c. Restore the required version.
Thanks for the understanding and support.
Regards,
Rebecca Tu
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
How to execute XML batch commands using SharePoint Web services or Client Object Model
Hi,
I have a requirement to execute some batch commands to update SharePoint View Style, how can i do it using SharePoint webservices or SharePoint Client Object model.
I need to execute the following Batch command over a particular web.
<Method ID="UpdateView">
<SetVar Name="Cmd">UpdateView</SetVar>
<SetList Scope="Request">{GUID of List}</SetList>
<SetVar Name="View">{GUID of View}</SetVar>
<SetVar Name="ViewStyle">6</SetVar>
<SetVar Name="RowLimit">100</SetVar>
<SetVar Name="Paged">TRUE</SetVar>
</Method>Hi
I tried it already... But UpdateView Method in the Views.asmx and Lists.asmx, both are not supporting for updating the style of the view (like Boxed, Newsletter...).
If you have any code sample which will do this job with any of the SharePoint web services, please share it.. -
How do I use the Verizon Service & Protection app to locate my phone if it gets lost?
The Verizon Support & Protection app (VZ Protect) is installed on my phone and is supposed to help me if my phone is lost or stolen by allowing me to find it on a map, lock it, erase my data from it, etc. But I found it nearly impossible to figure out what I should do in the event that actually did get lost or stolen.
I logged into my My Verizon account from my computer (which is probably what I would do if I lost my phone), but unfortunately there isn't anything on the site to help a person who has actually lost their phone or had it stolen to quickly and easily locate it. Most of the links I found were only promoting Verizon's services and the app, but nothing on how to use it.
I tried searching for things I might type if I had actually lost my phone (like, "missing phone", "stolen phone", "find lost phone"). I had to go into the "How to Use Guide: Verizon Support & Protection" page, which I was only able to find on the Verizon Support & Protection FAQs page), in order to find a link that told me I had to go to the Verizon Support & Protection App website to use this service.
There really should be something more obvious right on the My Verizon site.Purchase a replacement remote.
The remote is required for configuring the ATV and setting up the remote app on iDevices. -
Error in Excel VBA script while using sharepoint web service
Hi Can you please help me out in this ?
nain1987Hi Nain,
According to your description, my understanding is that the error occurred in the Excel VBA scripts which was used to update SharePoint list.
I recommend to check if the URL of the web service is in the right scope. If the list is in a subsite, the URL should be: http://servername/site/ _vti_bin/Lists.asmx.
To update SharePoint list using Excel VBA script, you can refer to the link below:
http://sharepoint.stackexchange.com/questions/34433/update-sharepoint-list-using-excel
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
I am trying to create an external content type for a specific list. The problem is that there are so many columns (more than 200) that I get the error:
The operation(s) generation creates an SQL query which exceeds the length limit in Business Data
Connectivity Metadata Store. The operation(s) will not be generated. Recreate
the operation(s) with less number of columns in the configuration.
I tried turning off a dozen columns and I am still getting this error. I am nearing the limit of the "extra" columns I can eliminate.
What is the actual limit on number of columns?
Thank you.Hi,
From my research, it seems to be the limitation in response TTL and response size. To confirm
it, would you please check the detailed errors logged in ULS log? <o:p></o:p>
If you identified the threshold has be reached, you may follow this link to increase
the threshold according to your business requirement.<o:p></o:p>
http://blogs.msdn.com/b/bcs/archive/2010/02/16/bcs-powershell-introduction-and-throttle-management.aspx
Miles LI TechNet Community Support -
RESTful service response using HTTP binding
Hi all,
I use a restful service and consume it using a HTTP binding adapter in my BPEL process. While sending response, the reponse is sent in xml format. But i want it just to be string. For example, i dont want the reponse to be like this "<Test>Firstname Lastname</Test>". I want it like "Firstname Lastname".
In oracle docs its given, for HTTP binding reponse, its always XML. Has anyone achieved sending response without xml tags and their namespaces?
Thanks,
TerryThank you for the reply
I am able to contact the same endpoint from SoapUI and also the browser. As far as I know there is no proxy that is required but I will still go ahead and ask the provider.
And do you have any clue why I am getting the error in Jdev when I compile the project?
And another thing that I would like to mention is that the WSDL that the HTTP Binding adapter created is incomplete as in it does not have the <wsdl:service> tag, is that something that I should be looking out for?
This is what my WSDL (generated by HTTP Binding Adapter) looks like
<?xml version="1.0" encoding="UTF-16"?>
<wsdl:definitions
name="Get"
targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/http/ProcessProject/GetContact/Get"
xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/http/ProcessProject/GetContact/Get"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:msg_in_out="http://TargetNamespace.com/http"
xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
<plt:partnerLinkType name="Request_Response_plt">
<plt:role name="Request-Response_role">
<plt:portType name="tns:Request_Response_ptt"/>
</plt:role>
</plt:partnerLinkType>
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://TargetNamespace.com/http" schemaLocation="xsd/Get.xsd"/>
</schema>
</wsdl:types>
<wsdl:message name="root_msg_in">
<wsdl:part name="root" element="msg_in_out:root"/>
</wsdl:message>
<wsdl:message name="root_msg_out">
<wsdl:part name="root" element="msg_in_out:root"/>
</wsdl:message>
<wsdl:portType name="Request_Response_ptt">
<wsdl:operation name="Request-Response">
<wsdl:input message="tns:root_msg_in"/>
<wsdl:output message="tns:root_msg_out"/>
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>
Thanks
Edited by: user1165407 on Aug 1, 2012 3:54 PM -
Calling Apex restful service in android
Hi frnds i have created apex restful service, now i want to access it in android...
So any one can help me how to call restful services using ksoap2.jarI got solution using HttpClient, but i can acces only "GET" method of restful services
But how to access Restfukl service using "POST" method
here is my code that i use to access rest service using "GET"
String url = "http://198.16.11.12:2000/apex/jigar/mr/employees/10";
HttpClient httpclient = new DefaultHttpClient();
HttpGet hg = new HttpGet(url);
HttpResponse response = httpclient.execute(hg);
str = inputStreamToString(response.getEntity().getContent());
Now insted of GET when i use POST to access service it returns null, what can be my URl in case of post? -
Do I need to install apex listener in order to use the Restful Services.
We are on apex 4.1 and use modplsql apex.
Do I need to also install apex listener in order to use the restful services or would it be just enougt to patch 4.1 to 4.1.1 and I can continue to use apex 4.1.1 with modplsql.
Thank you
KumarHi Kumar,
APEX Listener 1.1 (including your 1.1.4 installation) has a different implementation for RESTful webservices. You can access the configuration using APEX Listener's own configuration ("/listenerAdmin").
The new APEX-integrated RESTful implementation is provided with the new APEX Listener 2, which is still in Early Adpoters phase. It comes with a patch for APEX 4.1 to make 4.1 capable of using it as well. See the installation guide for the current EA release for details.
Since APEX 4.2 has been released now, I'd recommend to upgrade to this release instead of patching 4.1 if you don't have anything that would stop you from upgrading. And I expect APEX Listener 2 to be released soon as well, eventhough there hasn't been an official announcement yet.
-Udo
Maybe you are looking for
-
Hello. Could You tell me how to display icon in cell of ALV Grid? MAybe You have a link to some tutorial? I'm trying make such thing: to my itab I'm adding icon1 LIKE icon-id then I fill itab, to fieldcatalog give PERFORM append_wsfield USING
-
Calling a package from shellscript
Hello, I am trying to run open interface for GL. I am a newbie to oracle apps. The flow and steps i am following are 1. Load some sample data into staging table using sqlldr. 2.Validate and insert the data into gl_interface using pl/sql package. 3. W
-
I can't move photos from iPhoto to my secondary hard drive or to a burn folder. I have never had a problem with this before. This is something new. They will not drop into either folder. Nothing happens. I checked my secondary harddrive and the
-
Referencing a column of a materialized view
Hi, I have a master table in a database A CREATE TABLE formations ( nom_formation VARCHAR2(30) CONSTRAINT formations_nom_pk PRIMARY KEY I have made a materialized view of that table in a remote database B CREATE MATERIALIZED VIEW formations_mv In the
-
Error No disks Found during Solaris 10 installation
Hi, i am trying to install Solaris 10 x86 on an Ml370 server that we bought. during the installation it gives the error No Disks Found. how can i correct this problem?