When using SharePoint 2010 rest api - /_vti_bin/listdata.svc/UserInformationList, what is difference between Name and Account
-
08-12-2020 - |
题
In SharePoint when I call the listdata.svc/UserInformationList
, can someone help me understand Account versus Name?
<content type="application/xml">
<m:properties>
<d:Id m:type="Edm.Int32">1</d:Id>
<d:ContentTypeID>0x010A00F8C6531A37316E499095FDC0720C4D90</d:ContentTypeID>
<d:ContentType>Person</d:ContentType>
<d:Name>TESTDOMAIN\administrator</d:Name>
<d:Modified m:type="Edm.DateTime">2015-04-30T16:50:53</d:Modified>
<d:Created m:type="Edm.DateTime">2015-04-30T16:50:53</d:Created>
<d:CreatedById m:type="Edm.Int32">1073741823</d:CreatedById>
<d:ModifiedById m:type="Edm.Int32">1073741823</d:ModifiedById>
<d:Owshiddenversion m:type="Edm.Int32">1</d:Owshiddenversion>
<d:Version>1.0</d:Version>
<d:Path>/_catalogs/users</d:Path>
<d:Account>i:0#.w|TESTDOMAIN\administrator</d:Account>
<d:EMail m:null="true" />
<d:MobileNumber m:null="true" />
<d:AboutMe m:null="true" />
<d:SIPAddress m:null="true" />
<d:IsSiteAdmin m:type="Edm.Boolean">true</d:IsSiteAdmin>
<d:Deleted m:type="Edm.Boolean">false</d:Deleted>
<d:Hidden m:type="Edm.Boolean">false</d:Hidden>
<d:Picture m:null="true" />
<d:Department m:null="true" />
<d:JobTitle m:null="true" />
</m:properties>
</content>
What is the difference between the two?
In the account xml <d:Account>i:0#.w|TESTDOMAIN\administrator</d:Account>
what does the i:0#.w
mean?
解决方案
The prefix i:0#.w| before the username is to identify the type of authentication.
i : for an identity claim, otherwise it will be 'c'
# : for user logon name otherwise it will be $ : email address otherwise it will be % : Farm ID
w : for windows authentication OR f : form based authentication.
For details please take a look in below images,
Image 1 :
Image 2 :
其他提示
Name
is for Display Name actually, so if you sync your user details from a directory, the <d:Name>TESTDOMAIN\administrator</d:Name>
is likely to be replaced by <d:Name>Actual Full Name</d:Name>
, while Account
will remain unchanged.