none
Send Mail like anonimous user in office 365 sandbox solution

    Question

  • Hi!

    I use a sandbox solution in office 365 and I want to send an email to a external user. So I created a list workflow to send email and works fine, but if I access the site like an anonymous user, the workflow don´t complete.

    Is it possible to run a workflow with anonymous user in a office 365 sandbox solution?

    Regards,

    Fabrício

    Thursday, September 26, 2013 10:01 PM

All replies

  • I think it should be possible .. You may need to provide access to anonymous user on your list

    try this..

    1. Enable Anonymous access at the Web Application level

    Go to SharePoint Central Administration => Application Management, select the Web Application => Authentication Providers, click on the zone, and select Enable anonymous access

    2. Now, navigate to the corresponding web site, Site Action => Site Permissions => Anonymous Access.

    Configure what anonymous users can access at the site level

    3. Break the permission inheritance on the specific list

    List Settings => Permissions for this list => Stop Inheriting Permissions, click OK => Anonymous Access

    Select Add Items.

    4:- Run this code in your console app or  equivalent code in powershell

    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();

    5:- do IISREST


    Manoj Gangwar | Sharepoint MCPD | Sharepoint MCTS |

    Friday, September 27, 2013 8:12 AM
  • Hi,

    We can create an Event Receiver and start the workflow in it.

    Here is a link for you to take a look at:

    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/7817d1a9-524d-4430-9af5-7f28e9c9bcb6/how-to-start-a-designer-workflow-for-anonymous-user-in-sharepoint-2010

    Best Regards

    Dennis Guo
    TechNet Community Support

    Friday, September 27, 2013 9:47 AM
  • Dennis,

    SandBox solution don´t accept SPSecurity.RunWithElevatedPrivileges

    Friday, September 27, 2013 5:02 PM
  • There is no impersonation in sandbox if you want to allow workflow works correctly need to give permission for anonymous users to all lists used Mail Lists, Tasks, Task History

    Tarek Yehia
    Blog:http://sharepointserver-2007.blogspot.com/


    Tarek Yehia

    Friday, September 27, 2013 5:59 PM
  • I did it but not work...
    Friday, September 27, 2013 8:37 PM