Add -Federated switch for GitHub Actions federated credential auth (#440)

Silent and batch runs can now sign in with a GitHub Actions OIDC token
instead of a client secret or certificate. With -Federated, the tool
requests the token and passes it to MSAL with WithClientAssertion.

The access token is reused until it is within five minutes of expiry, so
a bulk export signs in once rather than on every Graph request.

Secret and certificate sign-in are unchanged.

Contributed by @mattskare.
This commit is contained in:
mattskare
2026-10-25 14:19:35 +11:00
committed by GitHub
parent 8a0f96a81d
commit 2f16133572
4 changed files with 47 additions and 13 deletions
+3 -1
View File
@@ -17,7 +17,9 @@ param(
[string]
$Secret,
[string]
$Certificate
$Certificate,
[switch]
$Federated
)
Import-Module ($PSScriptRoot + "\CloudAPIPowerShellManagement.psd1") -Force
$param = $PSBoundParameters