Sharepoint 2010 anonymous publishing site - workflows not running - sharepoint-2010

We're working on a publishing site with sharepoint 2010. It allows anonymous access, and these anonymous users can fill out certain forms. The form submission works fine as the anonymous user has permission to insert to the lists.
There is a simple workflow attached to each form that emails the contents of the form to an internal user. This works fine if you add the list item manually (ie logged in as a certain user), but the workflow can't be initiated by an anonymous user. It hangs in progress, then eventually fails.
I tried this:
http://blog.furuknap.net/enabling-declarative-workflows-for-anonymous-users-in-sp20102007
But it didn't seem to work either. Some comments from users refer to this same issue - and no one stated a resolution.
I'm worried that the only solution is the run with elevated privileges on each form as a custom web part.
Any solutions out there?
thanks.

The steps described in the mentioned post only work for items added to the list by email. So any items added (new form, new document, new event) added using the sharepoint UI will NOT trigger the workflows. (see the related MS KB article).
There are 2 things I can think of you could try:
Use an ItemEventReceiver bound to the list to send the email in the ItemAdded event.
If all the workflow does is send an email to a user, just have that user subscribe to the list using an alert

Related

Best way to authenticate a user in outlook office add-in using a magic link

Creating an outlook add-in for calendar and it will appear when user opens appointment window. In order to authenticate user, we are using magic link.Following is the current flow :
First time user clicks in add-in window ,clicks a button and gets a magic link in email.
User clicks on magic link, IE browser is launched and user gets a token.
User copies this token and paste in outlook-addin, clicks authenticate and it all goes through.
Problem with this approach is horrible user experience as user has to click multiple times and it might require some training to get users used to this part. Best would have been, clicking magic link Add-in would have got auto-launched and read token in email which I don't think is possible.
We even thought of reading email body with a add-in and extract token using regular expression. This seems to have issues such as performance and particularly adding a new add-in for email view or configuring the existing add-in for email as well as calendar.
Is there any better way to provide seamless user experience without changing the magic link?
I'm a little confused as to whether the token is already in the email body or can only be retrieved after clicking on the magic link. It is possible to read and parse the email messages for the token from the calendar add-in using REST API's (https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list_messages), but I wouldn't recommend that route as it's a bit convoluted. Otherwise, I can't think of a better solution than the ones you've suggested. If magic link is not a hard requirement, I would definitely go with one of these other authentication options.

Site Workflow Not Working With Contribute Permissions

I have set up a form where when someone presses the "Submit" button it initiates a site workflow to create a list item. It all works well when I (full control permissions) do it, but if someone with contribute permissions tries, it fails. I tried adding an impersonation step, but that doesn't seem to be working either. Also, I am trying to record the person who created the list item, and the impersonation step uses my name (workflow author) for "Created By."
Any suggestions as to what I could've possible done wrong, or what I should try to do/add? Thanks in advance...
Simple answer is No.
As you can see the checkboxes in workflow property, you can set the trigger to be
trigger itself when item added or modified.
manually start by users.
For the read-only user, they are not able to click the "start a workflow" button. Also, these users do not have permission to add or modify list item.
You can configure your workflow with "impersonation step". In this way, the workflow will be running under the account of "workflow creator" instead of the user trigger the workflow. However, even you applied "impersonation step", the read-only user still not able to trigger a workflow

How to populate active directory users data in a sharepoint 2010 new list item form?

I have a custom list in my SharePoint 2010 website. When I am adding a new item to my list, I want to populate data from active directory in the respective fields when I enter the exact user Id in my first field. Can it be done through SharePoint designer or through browser?
Depending on what user information you want to populate into the list, you may find it easier to use the SharePoint API directly and call the SPUser object instead.
SPUser user = web.EnsureUser(listItem["UserField""]);
The EnsureUser() method will require you to give it a username in the format: domain\user.
That being said, you'd probably behoove yourself to just make the field in question an SPUser field in the first place. That way the default new item / editor makes the field uses the PeoplePicker object to bring in actual users. If you do need to call Active Directory directly, you can do that, too, I guess, but since virtually everything in AD can be exposed in SharePoint either automatically or by editing your User Profile Service application, there's not really a reason to invoke AD directly in most scenarios.

Allow a user to write to sharepoint List

I am developing an application page in sharepoint 2010, in this page the users gets a list of available training courses, and there is a link to register to it.
The problem is that the common users does not have access to the list where the attendances are register, so if I run the application with an user with priviledges it works, but if I try to run it with a common user it fails.
What can i do?
Thanks for any advice ..!
Your code block must run by the following code:
SPSecurity.RunWithElevatedPrivileges(delegate() {
// write to list code ...
}

Visual Basic Application Help

I want to make an application witch involves logging into google. It is basically a small application to always have your gmail with you without always having to go to the web browser and log in. Basically what I want to do is, when the person signs into their google account (or the page url changes) I want the webbrowser to refresh and go to a new point in the form and create an animation using a timer. I dont need help with the animation, I just need to know how to link it together with the person signing into google. And also, If it's possible I would like to have the person log in without the actual google web interface, but with 2 textboxes and a button. I am using Visual Studio 2008 and help with my application would be greatly appreciated!
One of the great things about GMail is that it gives you Pop3 access to the mailbox. Your application should be able to use Pop3 to login to the mailbox directly and not require the user to use the google web page (or any web page) at all.
This would be much more secure and fault tolerant than highjacking a browser session or scraping a web page for emails (as your application would break as soon as google updated the gmail app or the user changed their preferences).
You should be able to find numerous Pop3 tutorials, libraries and samples on the net (and most probably here on SO).
If you still insist to use the web browser control, you should investigate crafting your own HTTP-Post query to the page that takes the GMail login. Once you craft the correct message (including the user's username and password as the appropriate POST variables) you should be able to login directly.
Finally, you might want to have a look around on code.google.com as I'm certain this has been done before and you will most likely be able to find some sample code (whichever way you go).
Good Luck!