adfsToolbox icon indicating copy to clipboard operation
adfsToolbox copied to clipboard

Error when the service has a UPN user where the domain from UPN is not the correct to "domain\username" format

Open asmialoski opened this issue 3 years ago • 0 comments

I have experienced an error in the following snippet of the code (around line 1022): # Check for UPN style old name and convert to domain\username for SPN work items If ($OldName.ToString() -match "@") { $OldName = ($OldName.Split("@")[1]).ToString() + "" + ($OldName.Split("@")[0]).ToString() Write-Host "tUsing $OldName in order to meet SPN requirements" -ForegroundColor "gray" ($ElapsedTime.Elapsed.ToString())+" [INFO] Using $OldName in order to meet SPN requirements" | Out-File $LogPath -Append }

The error occurred because the old ADFS Service user was in the UPN format AND the domain part is not the same domain to use in the format 'domain\user'.

To solve, I need to change the user format in ADFS Service to 'domain\user' before to run the script again.

asmialoski avatar Jul 22 '21 17:07 asmialoski