Saturday, 28 February 2015

MembershipGroupId=0

 The other day, I was having issues with a SharePoint 2013 workflow. The workflow would break when sending notifications to a SharePoint group which I was member of. As a matter of fact the only member of it. The workflow would go into a "Canceled" state, with an error "System.ApplicationException: HTTP 400"

Taking out my user account, from the SharePoint group, and using some one else would make the workflow ‘happy’.

I removed my user account from the 'User Profile' service and added it back, and it didn't yield any joy.

After discussing the issue with one of my colleague, he suggested to go inside a SharePoint group and replace the SharePoint group id with 0, as in "MembershipGroupId=0".

After doing this, I saw a complete list of the users in the Site Collection and noticed that there were two accounts for me. I removed the duplicated account and kicked off the workflow again. Problem solved!

So, if you ever are having issues around workflow notifications and you think that the culprit may be a specific account, this trick may help you out.