none
User Profile consuming service of User Profile of another machine

    Question

  • I have a Development Virtual Machine with SharePoint 2010 installed Machine A). I installed SharePoint 2010 on another Virtual Machine (Machine B). I want the User Profile Service of Machine A to consume User Profile Service of Machine B. What's the procedure for that. Any links of suggestions? Thanks a lot.

    Mayank

    Saturday, December 29, 2012 7:28 AM

Answers

All replies

  • Hi Mayank,

    Use "userprofileservice.asmx" to get user details from other machine in same domain. Please ook below blog for your ref:

    http://sacarter.wordpress.com/2011/08/08/two-ways-to-call-userprofileservice-asmx/

    Hope it could help


    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Saturday, December 29, 2012 7:35 AM
    Moderator
  • Thanks Hemendra. I found another good article,

    Sharepoint 2010 Publishing and Consuming Cross-Farm Services

    http://marlonsalvador.blogspot.com/2010/08/sharepoint-2010-publishing-and.html?showComment=1356848388564#c87725096245817297

    Mayank

    Sunday, December 30, 2012 6:21 AM
  • I found a very good solution to have a SharePoint 2010 Virtual Machine consume User Profile services from another machine. I tried this solution with my colleage and it worked. Here it is:

    It typically takes a couple of minutes to establish the trust between the 2 consuming farms and 1 publishing farms. I believe this is originally one of you guys, but I adapted it a little.

    #Run this on the CA Server of each Farm
    #Note down the CA Server name for Each Farm

    # step 1: run this on the publishing farm only once
    Add-PSSnapin Microsoft.SharePoint.PowerShell -ea silentlycontinue
    # test and create certs directory
    $path = "C:\Certs"
    if((test-path $path) -eq $false)
    {
       [IO.Directory]::CreateDirectory("$path")
    }

    # export root certificate
    $rootCert = (Get-SPCertificateAuthority).RootCertificate
    $rootCert.Export("Cert") | Set-Content C:\Certs\PublisherRootCert.cer -Encoding byte

    # step 2: run this on EACH consumer farm
    Add-PSSnapin Microsoft.SharePoint.PowerShell -ea silentlycontinue
    # test and create certs directory
    $path = "C:\Certs"

    $Consumer = "LITSP6"

    if((test-path $path) -eq $false)
    {
       [IO.Directory]::CreateDirectory("$path")
    }

    # export root certificate
    $rootCert = (Get-SPCertificateAuthority).RootCertificate
    $rootCert.Export("Cert") | Set-Content C:\Certs\"$Consumer"RootCert.cer -Encoding byte

    # export sts certificate
    $stsCert = (Get-SPSecurityTokenServiceConfig).LocalLoginProvider.SigningCertificate
    $stsCert.Export("Cert") | Set-Content C:\Certs\"$Consumer"STSCert.cer -Encoding byte

    # export the farm id
    $farmID = (Get-SPFarm).Id
    New-Item C:\Certs\"$Consumer"FarmID.txt -type file -force -value "$farmID"


    # step 3: run this on the publisher or consumer farm once for each consumer

    # farm server names
    $publisher = "LITSP5"

    #Uncomment one at a time
    $Consumer = "LITSP1"
    #$Consumer = "LITSP6"

    # copy consumer farm id to publisher
    Copy-Item \\"$Consumer"\c$\Certs\"$Consumer"FarmID.txt \\$publisher\c$\Certs

    # copy publisher root cert to consumer
    Copy-Item \\$publisher\c$\Certs\PublisherRootCert.cer \\"$Consumer"\c$\Certs

    # copy consumer root cert to publisher
    Copy-Item \\"$Consumer"\c$\Certs\"$Consumer"RootCert.cer \\$publisher\c$\Certs

    # copy consumer sts cert to publisher
    Copy-Item \\"$Consumer"\c$\Certs\"$Consumer"STSCert.cer \\$publisher\c$\Certs


    # step 4: run this on publisher farm once per consumer
    $trustName = "Internet Farm"

    #Uncomment one pair at a time

    $Consumer = "LITSP1"
    $trustName = "Internet Farm"
    #$Consumer = "LITSP6"
    #$trustName = "Intranet Farm"


    # import consumer root cert
    $trustCert = Get-PfxCertificate C:\certs\"$Consumer"RootCert.cer
    New-SPTrustedRootAuthority -Name "$trustname" -Certificate $trustCert

    $stsCert = Get-PfxCertificate c:\certs\"$Consumer"STSCert.cer
    New-SPTrustedServiceTokenIssuer -Name "$trustName" -Certificate $stsCert


    # step 5: run this on EACH consumer farm

    $trustName = "Services Farm"

    # import root cert
    $trustCert = Get-PfxCertificate C:\Certs\PublisherRootCert.cer
    New-SPTrustedRootAuthority -Name "$trustName" -Certificate $trustCert


    # step 6: run this on publisher farm once per consumer

    #Uncomment one at a time
    $Consumer = "LITSP1"
    #$Consumer = "LITSP6"

    # get consumer farm id
    $farmID = Get-Content C:\Certs\"$Consumer"FarmID.txt

    # get topology service security
    $security = Get-SPTopologyServiceApplication | Get-SPServiceApplicationSecurity

    # get claim provider
    $claimProvider = (Get-SPClaimProvider System).ClaimProvider

    # create principal for farm id
    $principal = New-SPClaimsPrincipal -ClaimType "http://schemas.microsoft.com/sharepoint/2009/08/claims/farmid" -ClaimProvider $claimProvider -ClaimValue $farmID

    # grant full control to the toplogy service to the farm id
    Grant-SPObjectSecurity -Identity $security -Principal $principal -Rights "Full Control"
    Get-SPTopologyServiceApplication | Set-SPServiceApplicationSecurity -ObjectSecurity $security

    Good luck!

    Mayank Shyam


    Thursday, January 3, 2013 8:47 PM