Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Basic Auth over HTTPS from reports MI_RESULT_ACCESS_DENIED #118

Closed
dantraMSFT opened this issue May 2, 2018 · 1 comment
Closed

Basic Auth over HTTPS from reports MI_RESULT_ACCESS_DENIED #118

dantraMSFT opened this issue May 2, 2018 · 1 comment
Assignees

Comments

@dantraMSFT
Copy link
Contributor

With PowerShell version 6.1 preview and PSRP 1.4.2-2, attempting to create a new PSSession using Basic Authentication and -UseSSL reports error code 2 (MI_RESULT_ACCESS_DENIED)

Repro:
PS> $cred = Get-Credential username@hostname
PS> $session = New-PSSession -Computer -Credential $cred -Authentication Basic -UseSSL

Expected:
A PSSession is created.

Actual:
New-PSSession : [dantradesk] Connecting to remote server dantradesk failed with the following error message : Basic Authorization failed for user psrptest@dantradesk For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:12

  • $session = New-PSSession -ComputerName dantradesk -Credential $cred - ...
  •        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
  • FullyQualifiedErrorId : 2,PSSessionOpenFailed
@dantraMSFT
Copy link
Contributor Author

Closing. The issue is with the username in the credential. Using a machine qualified user name, such as machinename\user or user@machinename is failing. Using an unqualified username succeeds.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant