Skip to content

Validation check doesn't check the correct settings #359

@IL0veGuitars

Description

@IL0veGuitars

707-709 in deploy.ps1

if ($graphVersion.Major -gt 1) {
  $accesstoken = ConvertTo-SecureString $accesstoken -AsPlainText -Force
}

This only focuses on graph modules , it does not account for the access token already being a secure string .
The command Get-AzAccessToken which produces the token >>

https://learn.microsoft.com/en-us/powershell/module/az.accounts/get-azaccesstoken?view=azps-14.2.0

"Note

For security purposes, the default output type has been changed from a plain text String to SecureString. For more information, see Protect secrets in Azure PowerShell."

Would suggest testing the output ...

if ($graphVersion.Major -gt 1) {
    if ($accesstoken -isnot [System.Security.SecureString]) {
        $accesstoken = ConvertTo-SecureString $accesstoken -AsPlainText -Force
    }
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions