InfoPath 2013 Read SharePoint 2013 File data using Rest API Access Denied Exception

I am designing a set of Forms and they need to query Data from among themselves.
The whole set up described below works in the Form Filler/Preview
I'll call them Form A and Form B
Form A has a repeating table that needs to be displayed in Form B
The user selects from a DropDown in Form B an Instance of Form A, using the selected I REST connection is executed so the Form A xml is available inside Form B. The connection is set up as follows:
_api/web/lists/ListName/Items(SelectedId)/File/$value
I publish the form as site content type, add it to a library, after triggering the REST connection I get an error. ULS gives me a 401 Access denied for NT Authority\IUSR (as it should since I don't have anonymous access enabled [nor has that solved the issue])
That's my issue. All requests on the REST api are being executed as anonymous and not as a user that should have permission.
Things I've tried:
1. The connection uses a UDCX file, the conenction is set to use the form server proxy. The proxy has been enabled for the Form Services, web application and user connection. I've tried it with a configured App ID or an Explicit account
2. I've tried enabling Anonymous access, but have had no success
3. I've gotten the Query to work on Post Backs by adding the following to the web.config:
<location path="_layouts/15/Postback.FormServer.aspx">
    <system.web>
      <identity impersonate="false" userName="bhs\sp_admin_dev" password="M1crosoft" />
    </system.web>
  </location>
And while it solves the issue for Postback requests and I could add FormServer.aspx to the list I can't use this solution for a production environment, nor can I predict other issues that could be caused by the change.
I haven't been able to find any references to this error so I wonder if I'm doing something wrong or if there's another way to do this.
If I've been unclear on anything, let me know and I'll try to clear it up.

Hi Choggo,
thank you for your information,
regarding this issue, it seems we may need to debug and trace your network, to check if should the parameter that is used for the REST connection is correct.
i checked with infopath team members regarding this issue, they suggest that you try with impersonation, so that the user that login is not anonymous, but the user that you already been assign with.
the last suggestions from our sharepoint team members that we are able to do, as we have limited tools on this forum support, that you need to check the file udcx itself, do the permission to access that file is correct, so for example, if the file is not
having the permission to be read/access then the system may result with anonymous account, so that we may have the result that the data that should be passed are able to accessed.
if should this suggestion not applicable to your environment, our sharepoint team members suggest that you to open an incident ticket, so that we can check and re-confirm more deep for you if should this is an undocumented feature or not.  the action
plans is to have a remote session, then we can trace the data passing process, that is already correct, so that the IUSR is not appear when it authenticate.
http://support.microsoft.com/contactus/?wa=wsignin1.0
Regards,
Aries
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

Similar Messages

  • How to Get user profile properties in provider -cloud hosted app in sharepoint online - office 365 using REST API?

    How to Get user profile properties in provider -cloud hosted app in sharepoint online - office 365 using REST API?
    any idea?

    Hi,
    From your description, my understanding is that you want to get user profile properties in provider-hosted app in SharePoint online using REST API.
    Here is sample code for getting user profile properties:
    http://www.vrdmn.com/2013/07/sharepoint-2013-get-userprofile.html
    Here is a blog below about accessing data from the provider-host apps:
    http://dannyjessee.com/blog/index.php/2014/07/accessing-sharepoint-data-from-provider-hosted-apps-use-the-right-context/
    Best Regards,
    Vincent Han
    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]

  • Problem when selecting PublishingRollupImage using REST API using Javascript ?

    Hii Guys,
    I am developing  a listing page of News using REST, the custom list contains Title, PublishingRollupImage, and other fields which is provided in the $select
    http://xyz/_api/web/lists/getbytitle('News')/Items?$select=Title,Link,PublishingRollupImage
    the column "PublishingRollupImage" is there and i can return the result by using normal JavaScript API with CAML query.
    but REST calling while specifying this column is failing with this error
    The field or property 'PublishingRollupImage' does not exist
    Microsoft.SharePoint.Client.InvalidClientQueryException
    please note that this is not the (hyperlink/image) field,
    its an existing site columns (publishing image)

    Hi,
    According to your post, my understanding is that you want to get Rollup Image data using REST API.
    Per my knowledge, we can’t get it using REST API.
    We can use Client Object Model to achieve it, the following code snippet for your reference:
    var ctx = new SP.ClientContext();
    var items = ctx.get_web().get_lists().getByTitle('Pages').getItems(new SP.CamlQuery());
    ctx.load(items);
    ctx.executeQueryAsync(function() {
    // Get the first items rollup image, just as an example
    var rollupImage = items.getItemAtIndex(0).get_item('PublishingRollupImage');
    console.log(rollupImage);
    If you still want to use the REST API, we can customize a We Service to achieve it.
    http://sharepointlearningcurve.blogspot.in/2013/08/creating-wcf-rest-service-for.html
    Here is a similar thread for you to take a look:
    http://sharepoint.stackexchange.com/questions/46844/how-to-get-publishingrollupimage-for-page-in-page-library-with-rest-and-jquery
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Cannot view InfoPath Form on SHarePoint 2013 since I removed SkyDrive for Business and installed OneDrive For Business

    I removed SkyDrive for Business and installed OneDrive for Business on my laptop. After that, I had problems opening a Word and Excel document in a SharePoint site (SP2013). After installing Service Pack2 from Office2010, this problem is solved. 
    But I still have the same problem with InfoPath. Whenever I click an InfoPath form (I have InfoPath 2010 on my laptop),...
    ... I get the error "cannot display web page".
    When I change the URL 
    ms-infopath:ofe|u|http://intranet.water-link.be/samenwerken/awwit/Autorisaties/Gebruikersbeheer/2015-02-25%20Aanvraag%20gebruikersbeheer%20voor%20Stephanie%20Geeraerts.xml
    into
    http://intranet.water-link.be/samenwerken/awwit/Autorisaties/Gebruikersbeheer/2015-02-25%20Aanvraag%20gebruikersbeheer%20voor%20Stephanie%20Geeraerts.xml 
    I can open the InfoPath form and read it.
    Any ideas about how to fix this ? I already tried to restore the Office 2010 via Control Panel - Install Programs but without any success... 

    Hi Gert,
    As I understand, you can’t open InfoPath form in SharePoint 2013 unless you change the URL without “ms-infopath:ofe|u|”.
    There are some reasons which maybe cause this issue, and you can try to do things below:
    Access CA -> General Application Settings -> Configure InfoPath Form Service -> Check the two options in User Browser-enabled Form Templates.
    Go into the registry by typing regedit from the Run line and rename the SharePoint.OpenDocuments.5 key (ex. SharePoint.OpenDocuments.5.old) under HKEY_CLASSES_ROOT.
    In library settings, click "relink documents to this library".
    Here are some similar posts for your reference:
    http://blogs.technet.com/b/office_integration__sharepoint/archive/2014/02/24/quot-the-webpage-cannot-be-displayed-quot-when-trying-to-open-edit-an-office-file-from-a-sharepoint-2013-site.aspx
    http://www.infopathdev.com/forums/t/28998.aspx
    Thanks,
    Wendy
    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]

  • Document Set Creation in document library using REST API in Sharepoint 2013

    Hi,
    I want to create the document set using REST API call. Currently i am able to create the folder and able to upload the files using REST API's in the document library. Is there any way we can pass the contentype name or Id and create the document set using
    REST API call. We need to create the document set along with metadata and upload the files inside the document set.
    I need to create the document set along with meta data column values using REST API. Please let me know how we can achieve this through REST API.
    Thank you,
    Mylsamy

    Hi,
    According to your post, my understanding is that you wanted to create document set along with managed metadata fields.
    The REST API does not currently support working with Managed Metadata or Taxonomy fields.
    As a workaround, we can use the JavaScript Client Object Model.
    Create document set using JavaScript Client Object Model.
    http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/aacd96dc-0fb2-4f0d-ab4c-f94ce819e3ed/create-document-sets-with-javascript-com-sharepoint-2010
    Set managed metadata field with JavaScript Client Object Model.
    http://sharepoint.stackexchange.com/questions/95933/add-list-item-with-managed-metadata-field-through-jsom
    http://sharepointfieldnotes.blogspot.com/2013/06/sharepoint-2013-code-tips-setting.html
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Error occurs when I open the tasks list in MS Project Professional 2013 from SharePoint 2013

    Hi,
    I have created a SharePoint 2010 workflow for a tasks list that updates a list item column if the Date Complete <= Today's date & Percentage Complete = 100%
    I used 'Set Field in Current Item' in the workflow & the values are updated in the list for the current item.
    However, when I open the tasks list in MS Project Professional 2013 from SharePoint 2013, then I get a error "We can't write task - taskname to the SharePoint site. This is either because tasks list is in read only mode or because this task has a column
    that requires unique value."
    If I remove the 'Set Field in Current Item' in the workflow, then the error does not occur. However, the 'Set Field in Current Item' in the workflow is required.
    Please provide solution to this issue ASAP. Your reply will be greatly appreciated.
    Thanks in advance

    Hi Jack,
    A shot in the dark here.  I'm not convinced the error is from the workflow.  What is the definition of the list item column in SharePoint?  Have you set the column to requiring a unique vale?  Look at the column definition.

  • Office Web Apps 2013 with SharePoint 2013 Server

    Hi All,
    I have installed a separate server for Office Web Apps 2013 on Windows Server 2012 VM. I have followed TechNet's article on
    Deploying Office Web Apps Server & exactly followed steps.
    On SharePoint Server 2013 (Windows Server 2012), I followed TechNet’s article on
    Configure Office Web Apps for SharePoint. The Office Web Apps on SharePoint 2013 environment works for
    Excel document that shows “View in Browser” but
    no Preview.
    However, PowerPoint and Word documents doesn’t show “View in Browser”. I thought Internet Explorer 10 has some issue with Office Web Apps and checked on Chrome and results were same.
    On SharePoint Server 2013 environment, I have configured 3 services applications, MMS, UPS and Excel Service. 
    1.) Do I need any other service applications to be enabled for OWA 2013?      
    I read number of blogs,
    Installing Office Web Apps Server for SharePoint 2013 (Steve Mann),
    Install Office Web Apps 2013 with SharePoint 2013 (Max Melcher) and Spence Harbar
    (Enabling Office Web Apps Preview editing with SharePoint 2013). and all these blogs give more or less same steps that I have followed.  
    Strange thing is that Excel documents on my SharePoint 2013 sites are working but neither word or PowerPoint documents are not showing option for “View in Browser”. 
    I am using HTTP and not HTTPS.
    2. Can someone please advice how could I solve the Office Web Apps 2010 on Word and PPT?
    3. How to can enable preview for Excel, Word and PPT documents.
    Thanks you.
    Regards,
    Aroh
    Aroh Shukla

    Hi Inderjeet and Olafur,
    Thanks for your reply.
    @Inderjeet: That site collection feature on SP2010 works on our production environment but on SP2013 site collection there is no OWA feature. Microsoft recommends to have a separate OWA2013 server and what I create
    a separate VM for OWA2013 server.
    @Olafur: Your suggestion looks spot on. The OWA server does show the discovery:
    Our SP2013 development server has limited RAM (4GB) and it think is causing the issue.
    Let me check if increasing RAM solves the issue.
    Thanks again for your suggestions. (Interjeet and Olafur).
    --Aroh
    Aroh Shukla

  • How to encrypt excel file data using triple DES algorithm in oracle

    Hi,
    I would like to know the process or script to encrypt/decrypt the excel file data using triple DES algorithm in oracle.

    I'm not quite sure your requirement.... do you mean when uploading files to be stored in the database ?

  • Failed to Sync OneNote 2013 with Sharepoint 2013 - Saying Required Properties option is selected

    Hi All
    I am trying to integrating OneNote 2013 with Sharepoint 2013, but whatever i do it came up as:
    We can't sync because the Required Properties option is selected on the server. Disable the option, or move the notebook to a new location. (Error code: 0xE0000B9B)
    I've followed knowledge based and turn off the Required Properties as i can see off, but error still showing up.
    Has anyone encountered this error before?
    Thanks a lot for any contribution.

    HI G_Virus,
    Please check if any field is set as required, then set it to optional for the OneNote content type from the problem library.
    And also check Jannifer's reply mentioned that compare this content type fields to the OneNote without issue from other site collection or farm per the following post, see if it helps.
    http://office.microsoft.com/en-us/onenote-help/resolve-document-library-errors-when-using-onenote-with-sharepoint-HA102647129.aspx
    http://social.technet.microsoft.com/Forums/office/en-US/a0e8cb4e-6daa-4ef8-a856-337da837c5db/sync-error-to-sharepoint-2010-library-with-revisions-checkinout-not-enabled
    Thanks
    Daniel Yang
    TechNet Community Support

  • How to get permission of a sharepoint list for a user using REST api

    Hi there,
    I have a requirement where i need to check the access permission of a user against a List or Library only using REST api from my remote salesforce app. [I already have access token and I am able to view list, add item etc..]
    Say for example, I have to send the list name and user name, and get the result as Read, Write, Contribute(Manage), None. I need to display what permission does that user have for that List.
    How do I achieve this. Please help me.
    Thanks in advance.

    Hi,
    For High and low bits, we can create a new SP.BasePermissions object to use like below:
    function success(data){
    var permissions = new SP.BasePermissions();
    permissions.set(SP.PermissionKind.manageLists);
    var hasPermission = permissions.hasPermissions(data.d.EffectiveBasePermissions.High, data.d.EffectiveBasePermissions.Low);
    Here is a detailed article for your reference:
    http://www.lifeonplanetgroove.com/checking-user-permissions-from-the-sharepoint-2013-rest-api/
    Thanks
    Best Regards
    Jerry Guo
    TechNet Community Support

  • Add user to sharepoint group using REST API

    I am trying to add a user to sharepoint group with following code
    serviceUrl= Appweb + "/_api/SP.AppContextSite(@target)/web/sitegroups("+GroupId+")/users?@target='host web'";
        $.ajax({
            url: serviceUrl,
            type: "POST",
            contentType: "application/json; charset=utf-8",
            dataType: 'json',
            body: "{'__metadata': { 'type': 'SP.User' },'LoginName':'i:0#.f|membership|'+email }",
      headers: {"accept":"application/json;odata=verbose",
        "content-type": "application/json;odata=verbose",
        "X-RequestDigest":$("#__REQUESTDIGEST").val()
        async: false,
      success: function (data) {
               alert('success');
      error: function (data) {
                 alert('fail');
    The request goes to error function. Response of the request is Microsoft.SharePoint.Client.InvalidClientQueryException and message is A node of type 'EndOfInput' was read from the JSON reader when trying to read the start of an entry. A 'StartObject' node was
    expected
    I tried the sample from following link but fail it
    https://msdn.microsoft.com/en-us/library/office/dn531432.aspx

    Hi,
    Per my understanding, you might want to add an user to a SharePoint group in host web from a SharePoint Hosted App using REST API.
    Here is a working demo for your reference:
    var hostweburl;
    var appweburl;
    $(document).ready(function () {
    //Get the URI decoded URLs.
    hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
    appweburl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));
    // Resources are in URLs in the form:
    // web_url/_layouts/15/resource
    var scriptbase = hostweburl + "/_layouts/15/";
    // SP.RequestExecutor.js to make cross-domain requests
    $.getScript(scriptbase + "SP.RequestExecutor.js", loadPage);
    // Utilities
    // Retrieve a query string value.
    // For production purposes you may want to use a library to handle the query string.
    function getQueryStringParameter(paramToRetrieve)
    var params = document.URL.split("?")[1].split("&");
    for (var i = 0; i < params.length; i = i + 1)
    var singleParam = params[i].split("=");
    if (singleParam[0] == paramToRetrieve) return singleParam[1];
    function addUsersInGroup() {
    var executor;
    // Initialize the RequestExecutor with the app web URL.
    executor = new SP.RequestExecutor(appweburl);
    executor.executeAsync({
    url: appweburl + "/_api/SP.AppContextSite(@target)/web/sitegroups(8)/users?@target='" + hostweburl + "'",
    method: "POST",
    contentType: "application/json; charset=utf-8",
    dataType: 'json',
    body: "{'__metadata': { 'type': 'SP.User' },'LoginName':'i:0#.f|membership|[email protected]'}",
    headers: {
    "Accept": "application/json; odata=verbose",
    "content-type": "application/json;odata=verbose",
    "X-RequestDigest":$("#__REQUESTDIGEST").val()
    success: addUsersInGroupSuccessHandler,
    error: addUsersInGroupErrorHandler
    function addUsersInGroupSuccessHandler(data)
    console.log(data);
    var jsonObject = JSON.parse(data.body);
    console.log(jsonObject);
    function addUsersInGroupErrorHandler(data)
    console.log(data);
    var jsonObject = JSON.parse(data.body);
    console.log(jsonObject);
    Thanks 
    Patrick Liang
    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].

  • Open VDW files stored on file share using Visio Web Access

    Hi,
    Is it possiblwe to view VDW files that are stored in a file share using Visio Web Access in SharePoint?
    If so, how?
    Opening up a Visio Web Drawing stored in a SharePoint document library is straight forwards however I want to view a visio web drawing stored in a file system using the web access service.
    Hope I'm made myself clear.
    MDB

    Hi Jens,
    I will suggest you to call the support center, cause there are some bugs related to the issue you are having.
    http://www.cisco.com/en/US/support/tsd_cisco_small_business_support_center_contacts.html
    Regards.

  • Sharepoint-Hosted App giving FORBIDDEN error when i use REST Api

    Hi,
    I have created a sharepoint hosted app which will create Team site on button click.
    I used REST Api  and  NAPA Tool to develop this app.
    Napa tool gives to things ClientWebpart.aspx and Default.aspx.
    When i run my Default.aspx code is working fine but ClientWebpart.aspx is giving FORBIDDEN error when i am trying to create site.
    Below is the code which i used to create site
    code:
    var hostweburl;
    var appweburl;
    $(document).ready(function () {
    hostweburl= decodeURIComponent(getQueryStringParameter("SPHostUrl"));
    appweburl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));
    function createSPWeb() {
    $.ajax(
    url: appweburl +
    "/_api/SP.AppContextSite(@target)/web/webinfos/add?@target='" +
    hostweburl + "'",
    type: "POST",
    data: JSON.stringify(
    'parameters':
    '__metadata': { 'type': 'SP.WebInfoCreationInformation' },
    'Url': 'RestSubWeb',
    'Title': 'RestSubWeb',
    'Description': 'REST created web',
    'Language': 1033,
    'WebTemplate': 'sts#0',
    'UseUniquePermissions': false
    headers: {
    "accept": "application/json;odata=verbose",
    "content-type": "application/json;odata=verbose",
    "X-RequestDigest": $("#__REQUESTDIGEST").val()
    success: successHandler,
    error: errorHandler
    NOTE:This is on sharepoint online.
    Please help
    Regards,
    sudeep

    So in the app you are testing, are you using the FQDN or the NetBIOS name? Bad practice but could you test with both (hard code the absolute URL for testing purposes) then retest your app?
    If you are making a web part based on the new app model this will be an "app part" and probably have the same issues you are experiencing. If this is for something internal rather than a product you are developing to resell then the script editor /
    content editor web part approach could work for you.
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • How i can deal with oracle file by using php api

    how I can deal with oracle file by using php api ?

    What has this to do with Reflections and Reference Objects?

  • Using REST API to promote Document Properties into SharePoint document library

    Hi,
    Is it possible to extract Document properties of a file and update library column using REST API?
    Thanks,
    techie

    Hi,
    We can use the following REST endpoint to get document property:
    http://site/_api/web/getfilebyserverrelativeurl('/Shared Documents/filename.docx')/<property name>
    https://msdn.microsoft.com/en-us/library/office/dn450841(v=office.15).aspx#bk_File
    If you want to update document library column, the following blog for your reference:
    Updating SharePoint List items with SharePoint’s REST API in JavaScript
    http://community.rightpoint.com/blogs/viewpoint/archive/2014/10/23/updating-sharepoint-list-items-with-sharepoint-s-rest-api-in-javascript.aspx
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

Maybe you are looking for

  • Iphone 5s stuck in recovery mode after BLUE SCREEN OF DEATH (BSOD)

    Hi I have a replacement Iphone 5S which is out of warranty now and I am suffering from severe BSOD issues. I used the phone for a week and it was working fine till I experienced the first BSOD, the phone went to restart automatically and it was fine.

  • Preserving 'White' areas, but not backgrounds, in an image trace

    Hi there all I've got a little graphic that I'm working on at the moment. I am trying to trace it using the Image Trace feature in illustrator. Everything's hunky dory apart from the fact that the original graphic has a lot of white features on it th

  • Album art not importing

    I have gigs of wma files on my PC that have the album art associated. When I convert the files in Itumes it does not pick up the album art. I can manually copy the album art after the conversion, but is there a way it should just copy over? Also if I

  • 64-Bit Flash-Player (Language: German - Deutsch)

    Hallo, mittlerweile werden viele Computer mit 64-Bit Windows 7 ausgeliefert, wobei dort auch ein 64-Bit Internet-Explorer gibt. Seit 2009 setzt sich langsam die 64-Bit Technologie auch bei den Betriebssystemen durch, da diese doch einige Vorteile geg

  • Set offset on 0FISCPER

    Hi, I would like to display values for months from Jan - Dec. I am using Fiscal Year/Period. Which is restricted to and user entry variable. So when the user selects any perticular period the first column should display Jan, 2nd Feb and so on. I am i