microsoft / StoreBroker

A PowerShell module that leverages the Windows Store Submission API to allow easy automation of application submissions to the Windows Store. The master branch is stable and the v2 branch is under active development.
Other
97 stars 40 forks source link

Allow authorization using a certificate with Set-StoreBrokerCertificateAuthentication #250

Closed joseartrivera closed 4 months ago

joseartrivera commented 4 months ago

Adds a new Set-StoreBrokerCertificateAuthentication function that allows users to pass a X509Certificate2 object to use for authorization instead of a client id/secret.

Get-AccessToken was updated to use the Certificate for authentication. It will download the Microsoft Authentication Library if it was not already present on the machine. Microsoft.Identity.Client.ConfidentialClientApplicationBuilder is then used to authenticate using the Certificate. In the future we can consider using MSAL for client id/secret authentication too further merging the two forks of code.