如何在 SharePoint 中使用选定的用户配置文件服务
基本上,我正在制作一个计时器作业来发送从 SharePoint 用户配置文件服务 获取的birthdayWish 电子邮件。 但问题是我在服务器上有多个用户配置文件服务。
像1)。用户配置文件服务1
2)。用户配置文件服务2
3)。用户配置文件服务3
4). userprofile service4
那么如何使用第二个用户配置文件服务。
这是我所做的一些代码:
SPServiceContext oServiceContext = SPServiceContext.GetContext(SPServiceApplicationProxyGroup.Default, SPSiteSubscriptionIdentifier.Default);
UserProfileManager oProfileManager = new UserProfileManager(oServiceContext);
因此,在 SPServiceApplicationProxyGroup.Default 中,它获取第一个用户配置文件。
其中我想使用第二个用户配置文件服务。但默认情况下,当尝试访问其获取第一个用户配置文件服务并迭代它时。
那么如何将其设置为使用第二个用户配置文件服务。
Basically I am making a timer job to send a birthdayWish email fetched from SharePoint userprofile service.
But problem is I have multiple userprofile services on server.
like 1). userprofile service1
2). userprofile service2
3). userprofile service3
4). userprofile service4
So how to use 2nd user-profile service.
Here's some code, that I did:
SPServiceContext oServiceContext = SPServiceContext.GetContext(SPServiceApplicationProxyGroup.Default, SPSiteSubscriptionIdentifier.Default);
UserProfileManager oProfileManager = new UserProfileManager(oServiceContext);
So here in SPServiceApplicationProxyGroup.Default its getting 1st user-profile.
Among them I want to use 2nd user-profile service. but by default when trying to access its getting 1st user-profile service and iterate through it.
So how to set it to use 2nd user-profile service.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的猜测是,您有一个 User Profile Service 实例 (UPS),其上有多个 User Profile Service 应用程序 (UPA)(而不是多个 UPS):
My guess is that you have one User Profile Service Instance (UPS) with multiple User Profile Service Applications (UPA) on it (and not multiple UPS):