We are getting ready to go into production with federated accounts. For ProjectWise, I've written a PowerShell script to update set the user Identity and set the user to a federated account.
========================================================================================
import-module pwps_dab -DisableNameChecking
# Connect to ProjectWise TEST$PWord = ConvertTo-SecureString -String "******" -AsPlainText -Force$value = New-PWLogin -UserName admin -Password $PWord -DatasourceName datasource
$Users = Get-PWUsersByMatch -Email "*@acme.com" -LoginInfo | Where-Object {$_.Type -like "Windows*"} # $Users | Out-GridViewforeach ($u in $Users) { $currentUser = Set-PWUserIdentity -Users $u -Identity $u.Email $currentUser = Convert-PWUserToFederated -InputUser $u -IdentityName $u.Email}
=========================================================================================
Version Module----------- --------------------- 23.0.3.0 pwps_dab
The user lookup works successfully.
I can set the UserIdentity successfully.
The Convert-PWUserToFederated returns: "WARNING: Error creating database view" and does not update the user.
Any suggestions are appreciated? Are there anymore updates that need to be made at the user level for ProjectWise?
I got permission to create view(s) and that corrected the issue. I now have the user set as a federated user and the identity set as the users Azure account. Thank you.
Answer Verified By: syjtf