SharePoint serendipity is the effect by which one accidentally discovers something fortunate, especially while looking for something else entirely. In this case, it is the occassional musings, observations, and Ouija board readings about the phabulously

One More Claims Migration Gotcha For SharePoint 2010

One More Claims Migration Gotcha For SharePoint 2010

  • Comments 1
  • Likes

Hey folks, I've written previously about how to migrate code for claims users (such as Windows claims to SAML claims) in this post about the IMigrateUserCallback interface:  Just as with that post, our good friend Raju S. also had some other interesting information to add to this content today.  One of our other "friends of the blog" Israel V. noticed that after a recent migration he did the identities for workflows were not updated.  Turns out Raju had seen this before in a previous version of SharePoint (when migrating between different domains) and had done some code to fix up that issue.  The net of what you need to do here is go through and look at your workflow associations, and update the accounts that are associated with them. 

Each content type, list and web has a property called WorkflowAssociations where it stores this information.  It's just a collection so you can enumerate through each one, but as you can imagine, this may take some time to walk through an entire web application so plan accordingly.  A specific workflow association is really just a chunk of Xml so it's probably best to retrieve the AssociationData property and take a look at the Xml to get familiar with it.  As you review it, you should notice nodes for person, account ID and display name - those are going to be the values that you want to change.  After you change the Xml then you can just push it back into the AssociationData property and call the UpdateWorkflowAssociation method on the workflow association.

Thanks again to Israel for calling this problem out and to Raju for sharing his solution.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment