-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Invoke-WebRequest with digest #14599
Copy link
Copy link
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-ExternalThe issue is caused by external component(s).The issue is caused by external component(s).Resolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module
Description
We have a script that runs just fine on Powershell 5, but when executing on devops agenst running ubuntu and powershell core 7.1 it always fails with a 401 Error.
$Password = ConvertTo-SecureString $MongoAtlasApiKeyPrivate -AsPlainText -Force
$Credentials = New-Object System.Management.Automation.PSCredential ($MongoAtlasApiKeyPublic, $Password)
Invoke-WebRequest -Uri $MongoAtlasApiUrl -Method POST -ContentType "application/json" -Credential $Credentials -Body $json
It's trying to callt he mongo atlas api, which according to mongo's documentation requires digest authentictaion. However I couldn't find anything mentioning digest with Invoke-WebRequest. Onlny Oauth and other auth methods, but nothing about digest. Is it just no possible anymore since PWSH 6/7?
This is the corresponding mongo documentation: https://docs.atlas.mongodb.com/reference/api/whitelist-add-one
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-ExternalThe issue is caused by external component(s).The issue is caused by external component(s).Resolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module