Add list item using anonymous user in public website of shareopint 2013 office 365

Can any body know the solution to over come of following error while add list item using anonymous user using CSOM in shareopint 2013 office 365 public website.
I have tried following solution to narrow down the error from "Access permission"
http://sharepointtaproom.com/2014/08/28/anonymous-api-access-for-office-365-public-sites/#comment-2304

Try below:
http://www.codeproject.com/Articles/785099/Publish-a-Form-for-Anonymous-Users-on-a-Public-Sit
http://blogs.technet.com/b/sharepointdevelopersupport/archive/2013/06/13/how-to-allow-anonymous-users-to-add-items-to-sharepoint-list-using-client-object-model.aspx
// Allows AddItem operation using anonymous access
private
static voidAllowAnonAccess(){
Console.WriteLine("Enabling Anonymous access....");
SPWebApplication webApp =
SPWebApplication.Lookup(new
Uri(webAppUrl));
            webApp.ClientCallableSettings.AnonymousRestrictedTypes.Remove(typeof(Microsoft.SharePoint.SPList),
"GetItems");
            webApp.ClientCallableSettings.AnonymousRestrictedTypes.Remove(typeof(Microsoft.SharePoint.SPList),
"AddItem");
            webApp.Update();
Console.WriteLine("Enabled Anonymous access!");  
// Revokes Add/Get Item operation using anonymous access
private static
voidRemoveAnonAccess(){
Console.WriteLine("Disabling Anonymous access....");
SPWebApplication webApp =
SPWebApplication.Lookup(new
Uri(webAppUrl));
            webApp.ClientCallableSettings.AnonymousRestrictedTypes.Add(typeof(Microsoft.SharePoint.SPList),
"GetItems");
            webApp.ClientCallableSettings.AnonymousRestrictedTypes.Add(typeof(Microsoft.SharePoint.SPList),
"AddItem");
            webApp.Update();
Console.WriteLine("Disabled Anonymous access!"); 
http://www.fiechter.eu/Blog/Post/12/Create-a-survey-for-anonymous-users-on-Office-365
If this helped you resolve your issue, please mark it Answered

Similar Messages

  • Sharepoint programmaticaly add list item under current user - 0x80070005 (E_ACCESSDENIED))

    Please help me.
    In our company, we developed an application under the Apple device to work with the company's internal services , including it in this application it is possible to send messages to the corporate blog portal, which is deployed on Sharepoint 2013 .
    The application architecture is as follows:
    Server on which you installed Sharepoint 2013 is called "SPS01", on the same server is deployed on IIS web application called "WS",
    application "WS" taken in a separate application pool from Sharepoint 2013 .
    All Apple client devices communicate with Sharepoint 2013 through the web application "WS". For us it is important that when applying for Sharepoint 2013 with mobile
    devices, Apple remained the security context of the authenticated user, as access to documents stored in Sharepoint 2013 demarcated .
    For what would be maintained security context authenticated users , we applied techniques such as impersonation and kerberos .
    Request goes like this:
    Apple client connects to the Web application "WS", on the "WS" configured
    to connect to Kerberos enabled and impersonation . (Apple iOS 7 support kerberos ) , then all customer interaction with Sharepoint 2013 going through "WS". Kerberos
    we use that to get rid of the problem of "double hopes" that occur when a web application "WS"
    refers to the other network resources that are beyond the server "SPS01".
    Example:
    Web application "WS", which is on the server "SPS01", refers to a
    file server «FS01», to get a list of documents from the usual file balls through kerberos and impersonation request comes on «FS01»
    from the user who is authenticated by web application «WS».
    But there was a problem:
    If the user enters the Sharepoint 2013 through the browser on your computer, it can successfully keep there blog post .
    If the user is drawn to Sharepoint 2013 from a mobile device Apple, and tries to leave a message in the blog , the error appears : Access Denied. Exception: Access is denied.
    (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    Empirically by the following was revealed: I tried to give you a right to - it did not help:
    Administrator farm
    SQL database config and content - owner
    Administrator of User Profile Services
    Local Administrator
    BUT!
    When deploying Sharepoint 2013 group was created security domain - "domain \ farm_administrators" - which is in the local group Sharepoint 2013 - "Farm
    Administrators" If the user is included in the domain security group - "domain \ farm_administrators", then the user can successfully keep a blog
    post from a mobile device Apple.
    I want to note that this happens only through security group AD «domain \ farm_administrators»
    The question is, how can you determine what rights the special security group "domain \ farm_administrators" in Sharepoint 2013 , whereby the participants can successfully
    send messages to the blog with Apple mobile devices via the web application "WS".
    We also found a workaround , but it will not work as we would like.
    RunWithElevatedPrivileges
    http://msdn.microsoft.com/en-us/library/bb466220.aspx
    We can execute a part of the Web application "WS" with the highest privileges. In this case, the user was able to successfully send a message to your blog from your
    mobile device Apple.
    But when the code runs with the highest privileges - lost the security context of the authenticated user.
    In the author is shown as "System Account"
    public static XmlDocument addBlogMessage(string projectID, string text)
    XmlDocument response = new XmlDocument();
    string result = string.Empty;
    string webUrl = SPUrlUtility.CombineUrl(Constants.SITE_URL, projectID);
    using (SPSite site = new SPSite(webUrl))
    using (SPWeb web = site.OpenWeb())
    SPList blogMessagesList = web.GetList(SPUrlUtility.CombineUrl(webUrl, Constants.BLOG_MESSAGES_LIST_URL));
    SPListItem newBlogMessage = SPUtility.CreateNewDiscussion(blogMessagesList, "Сообщение");
    newBlogMessage[SPBuiltInFieldId.Body] = text;
    web.AllowUnsafeUpdates = true;
    newBlogMessage.Update();
    web.AllowUnsafeUpdates = false;
    result = "<response><userResult><code>Success</code><messageID>" + newBlogMessage["ID"].ToString() + "</messageID></userResult></response>";
    response.Load(new System.IO.StringReader(result));
    return response;

    Yes I make sure that the assigned field is filled as the workflow will not work unless that field is filled with a valid username.
    I am an administrator on this SharePoint site  and I am using several people to email to that are not admins on the same site.
    The issue seems to lie in the Workflow itself.  In the one step that I have "Send an email" you fill out what should go in the To: field in the email.  That is where it should say "Current Item:Assigned To" according to all the documentation I
    have read and what mine will only enter in the To: field is "Assigned To" only it is missing the key first part of where to look.  Even though when I go through the steps I have indicated that it the data should be found in the Current Item from
    the field of Assigned To and to return the information of email address, which is well with in the realm of this Action in Workflow. 
    I have been able to accomplish this in another workflow that is not meant to be Reusable and is tied to one list only.  This seems to only be an issue when trying to do this in the Reusable Workflow creation and execution and when I use the Association
    Columns.
    Any further ideas or suggestions?  Any would be appreciated.
    Regards,
    Lara K.

  • Managing User Photos with On Premise Lync 2013 & Office 365

    Hello, I'm just looking for a little clarity in terms of expected behavior when using the various methods of modifying user images on these systems.
    For example, I've read that Lync 2013 can utilize the high resolution photo that is stored within the user's Exchange mailbox. That would work good in theory, but what about Lync users who do not have an Exchange mailbox (or UM voicemail box)? Presumably
    in that case you could use one of the AD attributes, thumbnailPhoto or jpegPhoto, the latter being preferred as it allows for higher resolution images. However in my experience, when using the jpegPhoto attribute, dirsync does successfully replicate the photo
    and it shows up on the O365 portal, but the on-premise Lync server/clients have inconsistent success displaying them. Some user's can see other user's photos, but they can see eachothers or vice versa and eventually the Lync client stops displaying any of
    these photos. 
    Ideally for us, if we could use the jpegPhoto attribute for all users, as opposed to using exchange attributes for some, that would be best, but is it designed to work this way?

    Hi FuzzMunk,
    I don’t think that Lync Server will
    synchronize the photo from
    JPEGPhoto attribute, as I know
    it only synchronizes the photo from
    thumbnailPhoto attribute in Active Directory.
    You can see the photo displayed on Office365 portal
     because it synchronizes the photo from both the
    thumbailphoto and jpegphoto attributes.
    Some related articles and cases for your reference.
    http://blogs.technet.com/b/nexthop/archive/2010/11/22/microsoft-lync-2010-photo-experience.aspx
    https://technet.microsoft.com/en-us/library/jj688150.aspx
    https://social.technet.microsoft.com/Forums/lync/en-US/3ffc4fcd-eefc-4eca-bc7e-bcd007157199/lync-photo-from-active-directory
    https://social.technet.microsoft.com/Forums/windowsserver/en-US/53859480-a345-4ce0-a04e-9f1fc7a947c2/what-is-the-difference-between-jpegphoto-and-thumbnailphoto-attribute-in-ad?forum=winserverDS
    Best regards,
    Eric

  • Requestors end users will not acces a site directly and add list items

    Hi
    i created a  site for IT services  and this site includes some lists for various services
    http://Intranet.com/Units/IT services 
    main site is http://Intranet.com
    and also workflow are configured  for these lists for create new item
    and only 3 type of users will work on these lists
    1)Requestors (Create,View rights)
    2)Contributers (Contribute permissions)
    3)Approvers
    Scenario:
    -- Requestors    will create list items and approvers will Open this list item and  edit list item like
     approve and add a Contribute userid in AssignedTO field
    ---Contribute user also will recieve email and he also Open item and edit ans save this list
    so basically its backend  , data inserted by requestors will  save in lists
    so here i need all  Requestors  end users will not acces IT services site and add list item directly in list.
    is any other option availabe that i will provide a  diffrent front end page for Requestors at root level  site (which is Intranet.com )
    and they will add and view only their data, and  Contributers  also  view and edit all users data.
    adil

    Hi adilahmed,
    You can use two web parts to show the list items for different group.
    In the List view page, add another list view web part, set the first web part list view to filter Created By field with Me, second list with all list items.
    Then set the first web part with audience Requested group, and second web part with audience Contributers group.
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Rating a List Item using jquery with out using User profile service

    Hi,
    I dont have access to Central admin and i was not not able to enable USer profile service.
    can i rate a list item in Sharepoint 2010 using any jquery plugin
    i got the link
    http://blogs.msdn.com/b/carloshm/archive/2009/08/24/jquery-rating-in-sharepoint-lists.aspx
    But i am not able to find any plugin in it.
    Please advice.
    Thnaks,
    Pallavi

    Hi,
    According to your post, my understanding is that you wanted to rate a list item using JQuery in SharePoint 2010.
    The link you had posted above is for SharePoint 2007.
    You can refer to the following articles which about using the JQuery to call the rating service.
    http://blog.dennus.net/2011/08/09/using-spservices-and-jquery-to-include-social-rating-control-on-_layouts-page/
    https://www.habaneroconsulting.com/insights/Calling-the-Rating-Service-using-jQuery-in-SharePoint-2010-Part-1-of-2#.UxbQxvmSz6k
    You can also use the tool of the CodePlex to achieve it.
    http://sptoolbasket.codeplex.com/
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Tutorial on how to update list items using ListData.svc

    Can you please point me to a tutorial which shows how to update a list item using listdata.svc and C#?
    Sorry if this is FAQ.
    I have found articles on read list... but I haven't found anything on update a list item.
    val it: unit=()

    when i try this I get an error 500
    I created an ASP.NET web application that allows the user to modify data that is stored in SharePoint I rather not go into the reasons why this application was created but focus more on why doesn't the listdata.svc allow me to update a task item that was
    created by a workflow collect data from user action.
    1. The workflow creates the item.
    I collect the item and update the item using the below code. This is not an OOTB approval workflow that is just the name I used. When I get to save changes I received the following error code.
    Dim getApprovalItem As ExpenseApprovalRuleBasedTasksItem = spContext.ExpenseApprovalRuleBasedTasks.Where(Function(i) i.Id = Pam.ApprovalItemID).FirstOrDefault
    If String.IsNullOrEmpty(getApprovalItem.AuditorApprovalValue) Then
    getApprovalItem.AuditingComments = approvalComments
    Select Case approvalDecision
    Case "Approved"
    getApprovalItem.AuditorApproval = ExpenseApprovalRuleBasedTasksAuditorApprovalValue.CreateExpenseApprovalRuleBasedTasksAuditorApprovalValue("Approved")
    getApprovalItem.AuditorApprovalValue = "Approved"
    Case "Rejected"
    getApprovalItem.AuditorApproval = ExpenseApprovalRuleBasedTasksAuditorApprovalValue.CreateExpenseApprovalRuleBasedTasksAuditorApprovalValue("Rejected")
    getApprovalItem.AuditorApprovalValue = "Rejected"
    End Select
    getApprovalItem.Outcome = "Completed"
    getApprovalItem.Status = ExpenseApprovalRuleBasedTasksStatusValue.CreateExpenseApprovalRuleBasedTasksStatusValue("Completed")
    getApprovalItem.StatusValue = "Completed"
    getApprovalItem.Complete = True
    spContext.UpdateObject(getApprovalItem)
    spContext.SaveChanges()
    End If

  • How to update list item using client object model without changing created/modified dates?

    Hello All,
    I want to update list item using the SharePoint Client Object
    Model without updating the created / modified date. Is it possible?
    Please help.
    Thanks.

    Using the SystemUpdate method should do the trick, according
    to its literature.
    Additionally, would something like this be of any use for you?  Taken from this
    Stack Exchange thread: -
    public static class SPListItemExtensions
    /// <summary>
    /// Provides ability to update list item without firing event receiver.
    /// </summary>
    /// <param name="item"></param>
    /// <param name="doNotFireEvents">Disables firing event receiver while updating item.</param>
    public static void Update(this SPListItem item, bool doNotFireEvents)
    SPItemEventReceiverHandling rh = new SPItemEventReceiverHandling();
    if (doNotFireEvents)
    try
    rh.DisableEventFiring();
    item.Update();
    finally
    rh.EnableEventFiring();
    else
    item.Update();
    /// <summary>
    /// Provides ability to update list item without firing event receiver.
    /// </summary>
    /// <param name="item"></param>
    /// <param name="incrementListItemVersion"></param>
    /// <param name="doNotFireEvents">Disables firing event receiver while updating item.</param>
    public static void SystemUpdate(this SPListItem item, bool incrementListItemVersion, bool doNotFireEvents)
    SPItemEventReceiverHandling rh = new SPItemEventReceiverHandling();
    if (doNotFireEvents)
    try
    rh.DisableEventFiring();
    item.SystemUpdate(incrementListItemVersion);
    finally
    rh.EnableEventFiring();
    else
    item.SystemUpdate(incrementListItemVersion);
    /// <summary>
    /// Provides ability to update list item without firing event receiver.
    /// </summary>
    /// <param name="item"></param>
    /// <param name="doNotFireEvents">Disables firing event receiver while updating item.</param>
    public static void SystemUpdate(this SPListItem item, bool doNotFireEvents)
    SPItemEventReceiverHandling rh = new SPItemEventReceiverHandling();
    if (doNotFireEvents)
    try
    rh.DisableEventFiring();
    item.SystemUpdate();
    finally
    rh.EnableEventFiring();
    else
    item.SystemUpdate();
    private class SPItemEventReceiverHandling : SPItemEventReceiver
    public SPItemEventReceiverHandling() { }
    new public void DisableEventFiring()
    base.DisableEventFiring();
    new public void EnableEventFiring()
    base.EnableEventFiring();
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • Create List Item using REST API

    Hi All
      I try create list item using REST in SharePoint 2013.  when code is try add new item in list , getting error :
    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.
    Please help me
    function addData() {
    var title = $('#txtTitile').val();
    //alert(title);
    var items = {
    __metadata: { "Type": "SP.Data.OrderDetailsListItem"},
    Title:title
    var exec = new SP.RequestExecutor(appweburl);
    exec.executeAsync(
    url: appweburl + "/_api/SP.AppContextSite(@target)/web/lists/getbytitle('OrderDetails')/Items?@target='" + hostweburl + "'",
    method: "POST",
    data: JSON.stringify(items),
    headers: {
    Accept: "application/json;odata=verbose",
    "Content-Type": "application/json;odata=verbose",
    "X-RequestDigest": $("#__REQUESTDIGEST").val()
    success: function (data) { alert(JSON.parse(data)); },
    error: function (error)
    { alert(JSON.stringify(error)); }
    with Regards Sivam

    Hi,                                                             
    Here is a demo which works in my environment for your reference:
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function()
    $("#Button1").click(function(){
    createListItemWithDetails("list2", "http://sp2013sps", "item1");
    // Getting the item type for the list
    function GetItemTypeForListName(name) {
    //alert("GetItemTypeForListName: "+name);
    return"SP.Data." + name.charAt(0).toUpperCase() + name.slice(1) + "ListItem";
    // CREATE Operation
    // listName: The name of the list you want to get items from
    // siteurl: The url of the site that the list is in. // title: The value of the title field for the new item
    // success: The function to execute if the call is sucesfull
    // failure: The function to execute if the call fails
    function createListItemWithDetails(listName, siteUrl, title) {
    var itemType = GetItemTypeForListName(listName);
    //alert("itemType :"+itemType);
    var item = {
    "__metadata": { "type": itemType },
    "Title": title
    $.ajax({
    url: siteUrl + "/_api/web/lists/getbytitle('" + listName + "')/items",
    type: "POST",
    contentType: "application/json;odata=verbose",
    data: JSON.stringify(item),
    headers: {
    "Accept": "application/json;odata=verbose",
    "X-RequestDigest": $("#__REQUESTDIGEST").val()
    success: function (data) {
    location.href=location.href;
    //success(data);
    error: function (data) {
    alert("error");
    //failure(data);
    </script>
    <input id="Button1" type="button" value="Run Code"/>
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to update 500 list items using Rest API

    Hi All,
    i have requirement that is "required to update 500 list items using rest Api".
    how can i do it,please share your thoughts with me.
    Thanks,
    Madhu.

    Didn't get you correctly, if you asking reference for REST API to update list items please refer below links
    http://msdn.microsoft.com/en-us/library/office/jj164022(v=office.15).aspx
    Destin -MCPD: SharePoint Developer 2010, MCTS:SharePoint 2007 Application Development

  • Filter SharePoint list items using CAML query as same as Like operator in SQL Server.

    Hi ,
    I have filtered SharePoint list items based on Name using CAML query <Contains> . Now I have a new requirement is to filter list items using Like operator in SQL. But Like operator is not in CAML.
    How do I filter list items using CAML as same as Like operator in SQL.
    Please let me know.
    Thanks in Advance.

    Did you try using <Contains>?
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/15766fd5-50d5-4884-82a1-29a1d5e38610/caml-query-like-operator?forum=sharepointdevelopmentlegacy
    --Cheers

  • SharePoint 2013 document generation from list items using workflow

    I have been able to generate docs from list items using sharepoint designer workflow.But i have been able to do this with using one document template. But i have like 6 templates i would like to use what do i need to do to get this rolling would i need to
    have 6 different doc libs with a doc template?
    Thanks in Advance

    Thanks Sharma.
    I have create 6 content type and associated doc templates to them. I read I should be using .docx instead of dotx which I also tried
    But im still getting the error
    When I click details no error details  to help at all.
    Can anyone who is having this issue help or give me some hints.
    Cheers

  • Get list items using spservices for sharepoint 2013

    Hi,
    I have a requirement like below.
    I have 2 sharepoint custom list with some columns.
    List1:listA
    List2:listB
    Now when i open the listB new item form i want some of the field values from listA should auto populate in Textboxes of listB new form.
    Is there any ways to implement this?
    Regards,
    Poovi

    Hi Poovi,
    You can achieve this using jQuery to get the SharePoint list items. Refer the below articles. It has explained how to get list items using jQuery and auto populate a text-box from a list item as a source.
    You can put this code in list forms through SharePoint Designer. The articles explain about auto populating text box of web part but similarly you can implement it for list form, because nevertheless the text boxes are same.
    http://www.c-sharpcorner.com/UploadFile/sagarp/sharepoint-2010-jquery-autocomplete-textbox-containing-list/
    http://tomvangaever.be/blogv2/2011/07/sharepoint-2010-autocomplete-with-list-items/
    Please remember to click 'Mark as Answer' if the reply answers your query or 'Upvote' if it helps you.

  • Reading list items using JQeury

    Hi All,
    I am new to JQuery. Please help me on reading the ListItems(for eg., title, name, location etc.,) using JQeury & wanted to display this data in a site page.
    Let me know if you have any queries.
    Thanks,
    Kumar.

    check this article on using REST and Jquery to get list items
    http://www.plusconsulting.com/blog/2013/05/crud-on-list-items-using-rest-services-jquery/
    you can use JSOM as well
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/8dda0580-c632-4c1b-92f0-59e1a3f29e5b/jquery-fetch-data-from-sharepoint-list-in-a-webpart
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • Downsize Public Folders for Migration to Office 365

    To migrate public folders, I have been following this link: http://technet.microsoft.com/en-us/library/jj983799%28v=exchg.150%29.aspx
    However, this customer's public folders are exceeding well over 50GB. There are contacts and a calendar. I am looking for assistance/advice on downsizing public folders for migrating to Office 365.
    Exchange 2007
    Server: Windows Server 2008 Standard

    Hi,
    To reduce the public folder's size prior to the migration, you can try to delete the old content or split it into multiple smaller public folders.
    Here is a related article for your reference.
    Public Folders and Exchange Online
    http://blogs.technet.com/b/exchange/archive/2013/05/02/public-folders-and-exchange-online.aspx
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • Grant read permission on List for Anonymous user for public facing site in Sharepoint 2013 Online

    I have a public facing SP site ( SP online 2013 with Office 365 ). There are certain app parts added to it which read data from a
    custom list created on that site. By default anonymous users do not have read permissions list. I want users to see the list data without login in . I tried modifying the settings for anonymous users , however I am unable to do it as the "anonymous user"
    permissions cannot be checked by me.
    How do I provide read permissions to anonymous users?
    Thanks in advance

    once you make the web site online anonymous users get the read access to list.
    You can add the list view webpart and show the details to anonymous users. In the below link i have added the announcement list view webpart to a page.
    https://velegandla-public.sharepoint.com/Pages/Page.aspx
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

Maybe you are looking for

  • Voice memo

    Hi, You, i.e apple, have a serious problem with voice memo/volume control. For example, if you´re listening to music and switch to Voice Memo to record whatever, and then go back to listen to your music, volume control is not working, and the volume

  • How to resolve security sandbox violation (Error#2148) in Flex 3 on XP?

    Hi, When I tried to access an image on c:\ (on XP), I get the following error: *** Security Sandbox Violation *** Connection to file:///C:\DBFiles\3.jpg halted - not permitted from http://localhost/test-debug/test.swf -- Remote SWFs may not access lo

  • Create a new Grouping in IBY_FD_EXTRACT_EXT_PUB

    Hi, I need to create a new group in  IBY_FD_EXTRACT_EXT_PUB like below. eg: +*<OutboundPaymentInstruction>*+ ---+ +*<OutboundPayment>*+ ---+ +*<ExtendValue>*+ -- <Extend>+ ---<OUTPUTVALUE>Concatenated Value - 1</OUTPUTVALUE>+ +*</Extend>*+ -- <Extend

  • CS5 to CS4 converter

    I am a user of Illustrator CS4 and I have been sent a CS5 file. Is there any online converter tool that I can use to downsave the file in CS4 in order to work with it?

  • How to install J2ee sdk 1.4

    How to install j2ee sdk 1.4......is like j2ee sdk 1.3???????????