Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Uniquely Identifying a User

$
0
0

I'm building an app where I want to be able to uniquely identify a user, in a similar manner as how I can use a List GUID to identify a list or listItem.

There are a multitude of values that exist in the CurrentUser context.  I'm just now sure which one would be wholly unique,  Below is sample data

CurrentUser.ID - 1

CurrentUser.LoginName -  i:0#.f|membership|matt@somewhere.onmicrosoft.com

CurrentUser.UserId.NameId - 12345abc678de90f

The NameId seemed like a good candidate based what I read (http://msdn.microsoft.com/en-us/library/fp179932.aspx) but I just want to be sure.  LoginName could work but I can forsee issue if a user or system is ever able to change an e-mail, would that change the loginName?  Finally ID just doesn't seem right based on how every other elements exists with a GUID to identify it.

Any insight would be appreciated, thanks.

Matt


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>