Active Directory ADFS AD - ghdrako/doc_snipets GitHub Wiki

  • uid is a multi-value attribute. It's also not enforced as unique, so it's not appropriate as a unique identifier, unless you check for uniqueness before you set it. But that's your responsibility to maintain.

It is also not indexed, so it will be a little slower to search for an account by uid.

And it cannot be used for logging in.

So basically, use it for whatever you want to use it for, but you're responsible for what you put there.

https://learn.microsoft.com/pl-pl/windows/win32/adschema/a-uidnumber?redirectedfrom=MSDN

  • sAMAccountName on the other hand, is single-valued, enforced unique on the domain, indexed, and can be used for authentication.