diff --git a/powershell/public/core/Invoke-MtAzureRequest.ps1 b/powershell/public/core/Invoke-MtAzureRequest.ps1 index bbcbcf3b9..7930b24e1 100644 --- a/powershell/public/core/Invoke-MtAzureRequest.ps1 +++ b/powershell/public/core/Invoke-MtAzureRequest.ps1 @@ -62,7 +62,7 @@ function Invoke-MtAzureRequest { if ($Graph) { $baseUri = $((Get-AzContext).Environment.ExtendedProperties.MicrosoftGraphUrl) if ( -not $baseUri) { $baseUri = 'https://graph.microsoft.com' } - if ($ApiVersion -ne 'v1.0' -or $ApiVersion -ne 'beta') { $ApiVersion = 'v1.0' } + if ($ApiVersion -ne 'v1.0' -and $ApiVersion -ne 'beta') { $ApiVersion = 'v1.0' } $uriQueryEndpoint = New-Object System.UriBuilder -ArgumentList ([IO.Path]::Combine($baseUri, $ApiVersion, $RelativeUri)) @@ -94,4 +94,4 @@ function Invoke-MtAzureRequest { Write-Verbose ($params | ConvertTo-Json -Depth 3) $result = Invoke-AzRest @params return $result.Content | ConvertFrom-Json -} \ No newline at end of file +}