Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

How to access user profile service other than default using C#

$
0
0


I need to access other than default user profile service when multiple user profile services are associated to a single application. I use the below code but it always retrieves the default one set in the service application. I need to access other user profile services as well.

SPServiceApplicationProxyGroup applicationProxyGroup = SPFarm.Local.ServiceApplicationProxyGroups["Custom Proxy Group"];

SPServiceContext serviceContext = SPServiceContext.GetContext(applicationProxyGroup, SPSiteSubscriptionIdentifier.Default);


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>