[X] Make sure you are able to repro it on the latest version
[X] Search the existing issues.
Steps to reproduce
I'm trying to connect from PowerShell to a protected feed in Azure DevOps - hoping to avoid using PAT. I want users to be able to SSO and connect to feed and pull-down PowerShell modules.
I'm using CredentialProvider.Microsoft.exe to get and save the creds of the user.
The result is 'Response status code does not indicate success: 401 (Unauthorized).' Re-run the command with -Credential
If I change Find-PSResource -Name Hello-World -Repository MyDevOpsFeed to Find-PSResource -Name Setup-Git -Repository MyDevOpsFeed -Credential $credentialInfo I get the error Cannot bind parameter 'Credential'. Cannot convert the value of type "Microsoft.PowerShell.PSResourceGet.UtilClasses.PSCredentialInfo" to type "System.Management.Automation.PSCredential".
If I change Find-PSResource -Name Hello-World -Repository MyDevOpsFeed to Find-PSResource -Name Setup-Git -Repository MyDevOpsFeed -Credential $pscred I get the error
WARNING: Installing dependencies is not currently supported for V3 server protocol repositories. The package will be installed without installing dependencies.
Install-PSResource: .\connect.ps1:46:1
Line |
46 | Install-PSResource -Repository "MyDevOpsFeed" -Name Setup-Git -Cred …
| ~~~~~~~~~~~~~~~~~
| 'Response status code does not indicate success: 401 (Unauthorized).' Re-run the command with -Credential.
One thing woth noting, in the examples I have read they use a type Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo, I cannot seem to resolve this. I can however find Microsoft.PowerShell.PSResourceGet.UtilClasses.PSCredentialInfo
Expected behavior
Module installed
Actual behavior
Response status code does not indicate success: 401 (Unauthorized).' Re-run the command with -Credential
Error details
No response
Environment data
Name Value
---- -----
PSVersion 7.4.0
PSEdition Core
GitCommitId 7.4.0
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Prerequisites
Steps to reproduce
I'm trying to connect from PowerShell to a protected feed in Azure DevOps - hoping to avoid using PAT. I want users to be able to SSO and connect to feed and pull-down PowerShell modules.
I'm using CredentialProvider.Microsoft.exe to get and save the creds of the user.
Sample code:
The result is 'Response status code does not indicate success: 401 (Unauthorized).' Re-run the command with -Credential
If I change
Find-PSResource -Name Hello-World -Repository MyDevOpsFeed
toFind-PSResource -Name Setup-Git -Repository MyDevOpsFeed -Credential $credentialInfo
I get the error Cannot bind parameter 'Credential'. Cannot convert the value of type "Microsoft.PowerShell.PSResourceGet.UtilClasses.PSCredentialInfo" to type "System.Management.Automation.PSCredential".If I change
Find-PSResource -Name Hello-World -Repository MyDevOpsFeed
toFind-PSResource -Name Setup-Git -Repository MyDevOpsFeed -Credential $pscred
I get the errorWARNING: Installing dependencies is not currently supported for V3 server protocol repositories. The package will be installed without installing dependencies. Install-PSResource: .\connect.ps1:46:1 Line | 46 | Install-PSResource -Repository "MyDevOpsFeed" -Name Setup-Git -Cred … |
~~~~~~~~~~~~~~~~~ | 'Response status code does not indicate success: 401 (Unauthorized).' Re-run the command with -Credential.One thing woth noting, in the examples I have read they use a type Microsoft.PowerShell.PowerShellGet.UtilClasses.PSCredentialInfo, I cannot seem to resolve this. I can however find Microsoft.PowerShell.PSResourceGet.UtilClasses.PSCredentialInfo
Expected behavior
Actual behavior
Error details
No response
Environment data
Version
latest
Visuals
No response