Skip to content

Issue while connecting "twice" #540

@lucafabbri365

Description

@lucafabbri365

Hello,
I’m connecting to a Dynamics 365 environment with the following:

$myConn = Connect-CrmOnline -ServerUrl <ServerUrl> -Username user1@domain.com
# Auth window appears → sign in succeeds
Get-CrmRecords -Conn $myConn ...

This works as expected. However, in the same PowerShell session if I connect with a different account:

$myConn = Connect-CrmOnline -ServerUrl <ServerUrl> -Username user2@domain.com
# Auth window appears → sign in succeeds

Every subsequent Get-CrmRecords -Conn $myConn ... triggers the OAuth prompt again.
The only way I’ve found to stop the repeated prompts is to close the PowerShell session and start a new one.

Any thoughts ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions