Update federated identity

Hello,

I need some advice/help on how to update the federated identity of our PW users.

Today our users are configured in a hybrid way. Meaning that their type is logical, but they also have the Federated Identity configured. This allows them to login using either IMS or logical credentials.

Now we’re about to change the domain for most users from domain.com to domain-main.com, but I want to keep the type as is, special to avoid changing their logical password.

 

The cmdlet Update-PWUserProperties doesn’t allow me to change the identity.

The cmdlet Convert-PWUserToFederated has the -DoNotChangeUserType parameter, but I think it doesn’t work because they’re “hybrid” already…

It gives me the error bellow, and doesn’t update de federated identity

Get-PWUsersByMatch -Email 'susana.dias@domain.com' | Convert-PWUserToFederated -IdentityName susana.dias@domain-main.com -DoNotChangeUserType

WARNING: Could not modify user ''. Error: 58003

 

Without the -DoNotChangeUserType it will change the user type, and the logical password will be lost…

Do you have any suggestions on how to handle this?

 

Thank you for your support!

Susana Dias

Parents
  • I realize that it's been over three years, but did you get a resolution to this and, if so, do you recall what you did? I'm performing a similar command in my attempt to add this to a new user script.

    Get-PWUsersByMatch -Email $Email | Convert-PWUserToFederated

    WARNING: Identity '<username>' already exists.

    As I'm just starting to dabble in ProjectWise PowerShell, I am not really familiar with most of these commands and documentation/examples seem pretty sparse.

  • Issuing the command Get-Command -ModuleName pwps_dab *identity*

    yields 

    CommandType      Name                           Version  Source
    -----------      ----                           -------- ------
    Cmdlet           Set-PW365AutoSyncUserIdentity  23.1.8.0 pwps_dab
    Cmdlet           Set-PWUserIdentity             23.1.8.0 pwps_dab

    Set-PWUserIdentity should probably do what you want.   It is not accepting users from the pipeline contrary to the example, so you'll have to script something like

    $users = Get-PWUsersByMatch -Email $Email -verbose

    Set-PWUserIdentity -users $users -Identity $email -verbose

    Unless you think the output is excessive, always use the -verbose switch.

    Hope this helps,

    Mark Weisman | Bentley Systems

  • I did this on a datasource a few weeks ago and I want to say that while you can use an array for -Users, the Identity string is not an array and it will assign the same identity email to each account. I believe I ended up doing:

    $users = Get-PWUsersByMatch -Email '*@example.com' -Verbose
    ForEach ($u in $users) {
        Set-PWUserIdentity -User $u -Identity $u.email
    }
    

    if you already have some accounts that are setup you can change the get-pwusersbymatch to:

    $users = Get-PWUsersByMatch -Email '*@example.com' -LoginInfo | Where Identity -eq ''

     

Reply Children
No Data