Skip to content

Authentication not successful on Windows Server 2016 #272

Description

@volkhardv

Hello,
i use following script:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$clientId="<clientid>"
$clientSecret="<clientsecret>"
$tenantId="<tenant>"

Import-Module StoreBroker
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process


$css = ConvertTo-SecureString -String $ClientSecret -AsPlainText -force -Debug
$cred = New-Object System.Management.Automation.PSCredential $ClientId, $css
Set-StoreBrokerAuthentication -TenantId $TenantId -Credential $cred -Debug
Get-Applications -GetAll | Format-Applications -Verbose
  1. When using this Script on Windows 11 client machine, everything works fine.
  2. When using this Script on Windows Server 2016, i get the following message:
Be sure to check that your client id/secret are valid.
The underlying connection was closed: An unexpected error occurred on a send.
At C:\Program Files\WindowsPowerShell\Modules\StoreBroker\1.21.2\StoreBroker\StoreIngestionApi.psm1:556 char:9
+         Write-Log -Message $newLineOutput -Level Error
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Log
 
Be sure to check that your client id/secret are valid.
The underlying connection was closed: An unexpected error occurred on a send.
At C:\Program Files\WindowsPowerShell\Modules\StoreBroker\1.21.2\StoreBroker\StoreIngestionApi.psm1:557 char:9
+         throw $newLineOutput
+         ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Be sure to chec...rred on a send.:String) [], RuntimeException
    + FullyQualifiedErrorId : Be sure to check that your client id/secret are valid.
The underlying connection was closed: An unexpected error occurred on a send.

Do you have an idea?

best regards

Volkhard

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions