SharePoint 2013 Hosting – How to Use SPClaimProviderManager in SharePoint 2013?

Hey, if you’re like me and use claims to login to your SharePoint 2013, you most likely detected the user names went strange. Having a user name like domain\user can currently come one thing additional like i:0#.w|domain\user if you’re lucky, however I’ve seen intruder formats as well. Now, say a user sends you a login name (domain\user) and you would like to urge this value and set it to the appointed to of a task, or set permissions for this user – you’ll quickly decide you can’t get an SPUser object from this customary login name.

hostforlife banner-01

Also, once you wish to send the login name to a different system or work with it in your code – you may wish to urge simply the domain\user part, while not the claims decorations. True, the claims login formats are documented and you’ll hope to break down the format yourself to extract the user login from it, however I recently found a hidden (to me at least) gem in SharePoint API which will facilitate with this task.

First, begin using this namespace: Microsoft.SharePoint.Administration.Claims;

Now, you’ll work with SPClaimProviderManager object to see if a string may be a claims encoded user name, and convert it to a standard user name, and therefore the different way around. I’ve created this easy utility class on behalf of me to use in my code for now, here may be a code sample explaining a way to use this object:

Notice I’m expecting to get a windows login user name (SPIdentifierTypes.WindowsSamAccountName) but you can change this to support your own authentication. I hope this article works for you!

SharePoint 2013 Hosting Recommendation’s SharePoint 2013 Hosting solution offers a comprehensive feature set that is easy-to-use for new users, yet powerful enough for the most demanding web developer expert. Hosted SharePoint Foundation 2013 is the premiere web-based collaboration and productivity enhancement tool on the market today. With SharePoint 2013 Foundation, you can quickly access and manage documents and information anytime, anywhere though a Web browser in a secure and user friendly way. SharePoint hosting services start at only at €9.99/mo, allowing you to take advantage of the robust feature set for a small business price. offers a variety of hosted SharePoint Foundation 2013 plans as well as dedicated SharePoint 2013 Foundation options

recommended windows hosting