SharePoint 用户信息用户信息列表和人员列类型

发布于 2024-10-18 00:40:06 字数 981 浏览 5 评论 0原文

我正在通过 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

掐死时间 2024-10-25 00:40:06

在某些情况下,ID 来自此
用户中不存在该字段
返回该网站集,因此
ID 是哪里来的?是不是来自于
用户个人资料存储?

当用户从 AD 中删除时,或者当您将内容导入到该用户不再存在的网站或场时,我就遇到过这种情况。我猜想 person 值是无效的。请记住,人员字段只是用户信息列表中的查找字段。要恢复用户(如果存在),请使用 EnsureUser 方法,但他们将获得一个新的 id,因此您必须修复该问题。

我还注意到一个ID
从 UserGroup Web 返回的用户
不同地区的服务是不同的
同一用户的网站集
(即相同的登录)。如果用户
配置文件同步正在运行,这些是
一样吗?

这是正确的,每个网站集的用户 ID 都不同。这有点烦人,但它是有道理的,因为否则您将必须在所有网站集中创建所有用户。我相信用户配置文件同步会查看帐户名称或 sid 来进行匹配和更新。

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 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.

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?

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文