Open thetootall opened 6 months ago
$TenantIds = @('mytenantid1','mytenantid2')
foreach ($TenantId in $TenantIds) {
$null = Connect-AzAccount -TenantId $TenantId
$AccessToken = Get-AzAccessToken -TenantId $TenantId -ResourceTypeName MSGraph -AsSecureString -WarningAction SilentlyContinue | Select-Object -ExpandProperty Token
Invoke-ZTAssessment -AccessToken (ConvertFrom-SecureString $AccessToken -AsPlainText)
}
Sadly they ask for the access token in plaint text. That is bad practice, but this way it is not stored in plain text as a variable at least.
Hi team,
I would love to see a way to specify either a tenant ID or vanity domain name as a switch when I authenticate, as I have a single Global Reader credential via GDAP to access my clients, versus having to run this with separate credentials.
Is it possible to have it feed this into the module to make it more flexible?