Convert-PWUserToFederated returns Warning

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 "*" -LoginInfo | Where-Object {$_.Type -like "Windows*"}
# $Users | Out-GridView
foreach ($u in $Users) {
    $currentUser = Set-PWUserIdentity -Users $u -Identity $u.Email
    $currentUser = Convert-PWUserToFederated -InputUser $u -IdentityName $u.Email


Version      Module
-----------    ---------------------    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?

Parents Reply
  • I have verified that with sufficient database privileges, you should be able to execute this cmdlet repeatedly. I'm afraid you'll have to get your DBAs involved.  The database user that ProjectWise logs in with on the backend needs to have the privilege to create views.  

    This privilege came automatically for me.  But my database is not significant enough to require DBAs to protect it from security threats.

    Mark Weisman | Bentley Systems