Remove and Add Users between two environment claims provider

Hi,

We have claims based web application in SP 2013 where we have moved content DB from Prod to Test. Users are not able to access and when we investigated by running Get-SPUser for the web app all of them are referring to Prod claims and not to test claims

Prod Claims format:

"i:05.t|adfstest|XXXX"

Test Claims format:

"i:05.t|adfsprod|XXXX

As content DB is moved, We have only Prod claims for the web application. I wanted to remove the users with Prod claims and re-add them with Test claims. 

Have tried Move, Set, New - Nothing seems to be working. 

Please help me with your inputs

Many thanks in advance

June 18th, 2015 5:45pm

Hi Venkatesan,

As I understand, you want to remove the users with Prod claims and re-add them with Test claims in SharePoint 2013.

Do you use the same AD group for the prod and test environment?

If you do not use the same AD group, you should make sure the SharePoint server join to the new domain, then you could sync the user profile by AD import and user profile synchronization connection.

The article below is about Step by Step: Active Directory Import for SharePoint 2013

http://blogs.technet.com/b/meacoex/archive/2013/08/04/step-by-step-active-directory-import-for-sharepoint-2013.aspx

The article below is about Manage user profile synchronization in SharePoint Server 2013.

https://technet.microsoft.com/en-us/library/ff382639.aspx

Best regards,

Sara Fan

Free Windows Admin Tool Kit Click here and download it now
June 19th, 2015 9:34am

Hi Sara,

Thanks for your inputs but the scenario is different. 

We use different claims provider between Prod and Test

I found the solution myself:

Note:

- Test User Profile Service Application holds Test environment User Profiles

- Prod content DB has User Profiles from the Prod USPA

I wrote the script and It worked:(Unfortunately, PS cmdlet did not help for adding the user)

Logic:

1. Getting the Users list from the Groups using Get-SPUser with -Group and -Web parameter

2. Replace the prod with test in the UserLogin Identity

3. Using the below two cmdlets, I am removing the user from the group and re-adding the same user using Test Claims provider.

Cmdlet:

Remove-SPUser "$($UName)" -web "$($url)" -Group "$($group)" -Confirm:$false

stsadm -o adduser -url "$($url)" -userlogin "$($RepUser)" -Group "$($group)" -useremail "$($Email)" -username "$($Name)"

Script works great!

June 19th, 2015 3:53pm

You could just use Move-SPUser to migrate users between environments.
Free Windows Admin Tool Kit Click here and download it now
June 19th, 2015 5:28pm

Hi,

I tried Move-SPUser, Set-SPUser, New-SPuser by removing the old one...but nothing seems to be working.

June 19th, 2015 5:32pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics