SharePoint 用户信息用户信息列表和人员列类型
我正在通过 SharePoint Web 服务从多个网站集中检索用户信息。
http://mysitecollection.com/_vti_bin/usergroup.asmx
使用 'GetAllUserCollectionFromWeb' 方法返回网站集的所有用户。
下面的 XML 是返回内容的示例。
<Users>
<User
ID="108"
Sid="S-1-5-21-1650336054-1974872081-316617838-5403"
Name="Ian Curtis"
LoginName="JOY\division"
Email="[email protected]"
Notes=""
IsSiteAdmin="False"
IsDomainGroup="False" />
</Users>
我的问题是这样的。
我从列表 Web 服务获取一个列表项,其中一个字段是“人员”列。该信息以 Id;#Name 的格式存储。
在某些情况下,该字段中的 ID 不存在于为该网站集返回的用户中,那么该 ID 是从哪里来的呢?是来自用户配置文件商店吗?
我还注意到,从 UserGroup Web 服务返回的用户 ID 在同一用户的不同网站集中是不同的(即相同的登录名)。
如果用户配置文件同步正在运行,这些会是相同的吗?
I am retrieving the user information from a number of site collections through the SharePoint web services.
http://mysitecollection.com/_vti_bin/usergroup.asmx
Using the 'GetAllUserCollectionFromWeb' method to return all the users for a site collection.
The XML below is an example of what is returned.
<Users>
<User
ID="108"
Sid="S-1-5-21-1650336054-1974872081-316617838-5403"
Name="Ian Curtis"
LoginName="JOY\division"
Email="[email protected]"
Notes=""
IsSiteAdmin="False"
IsDomainGroup="False" />
</Users>
The question I have is this.
I'm getting a list item from the Lists web service and one of the fields is a Person column. The information is stored in the format of Id;#Name
In some instances the ID from this field does not exists in the users returned for that site collection, so where is the ID from? Is it from the User Profile store?
I have also noticed that the ID for a user returned from the UserGroup web service is different across different Site Collections for the same user (i.e. the same login).
If the user profile sync is running would these be the same?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当用户从 AD 中删除时,或者当您将内容导入到该用户不再存在的网站或场时,我就遇到过这种情况。我猜想 person 值是无效的。请记住,人员字段只是用户信息列表中的查找字段。要恢复用户(如果存在),请使用 EnsureUser 方法,但他们将获得一个新的 id,因此您必须修复该问题。
这是正确的,每个网站集的用户 ID 都不同。这有点烦人,但它是有道理的,因为否则您将必须在所有网站集中创建所有用户。我相信用户配置文件同步会查看帐户名称或 sid 来进行匹配和更新。
I have had this happen when a user is deleted from AD, or when you import content into a site or farm where that user does not exist anymore. I would guess that the person value is invalid. Remember that a person field is just a lookup field onto the user information list. To bring the user back (if they exist) use the EnsureUser method, but they will get a new id, so you will have to fix that up.
This is correct, the user id is different per site collection. It kind of annoying, but it makes sense, because other wise you would have to create all users in all site collections. I believe the user profile sync looks at the account name or sid to do the matching and updating.