Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum What is the correct usage of New-PWLogin with the -Token argument?
    • Sign In

    • State Suggested Answer
    • Replies 11 replies
    • Answers 1 answer
    • Subscribers 66 subscribers
    • Views 618 views
    • Users 0 members are here
    • New-PWLogin
    • ProjectWise
    • pwps_dab
    • Login Error

    What is the correct usage of New-PWLogin with the -Token argument?

    Olivier Doucet
    Offline Olivier Doucet 7 months ago
    with: 
    $loginSplat = @{
      DatasourceName        = 'server:dsn'
      BentleyIMS            = $true
      UserName              = 'first.last@domain.com'
      Token                 = $AccessToken
      NonAdminLogin         = $true
    }
    New-PWLogin @loginSplat

    I am getting error 58064


    The access token was obtained with:

    $res = Get-OIDCToken   // redirects user to login screen

    $AccessToken = $res.access_token

    • Sign in to reply
    • Cancel

    Top Replies

    • MWBSI
      MWBSI Wed, Feb 22 2023 3:38 PM in reply to Kevin van Haaren +1
      Ok, here's the deal. For New-PWLogin, the Token parameter value will only be used if the -BentleyIMS parameter is specified. The -Token can be used to log in with IMS identities other than the one used…
    • MWBSI
      MWBSI Wed, Feb 22 2023 6:31 PM in reply to Olivier Doucet +1 suggested
      Once you get the token via the method above, you can re-use it. However, you cannot bypass the Connection Client, at least initially. This is by design. Presently you cannot use an OIDC token to log…

    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies