diff --git a/pipelines/snippets.yml b/pipelines/snippets.yml index 4eacc1804..c0fac6929 100644 --- a/pipelines/snippets.yml +++ b/pipelines/snippets.yml @@ -181,8 +181,8 @@ stages: - pwsh: | Write-Host "Installing module ImportExcel" Install-Module -Name ImportExcel -Scope CurrentUser -Force -AllowClobber - Write-Host "Installing module Microsoft.Graph" - Install-Module Microsoft.Graph -Repository PSGallery -Scope CurrentUser -AcceptLicense -Force -AllowClobber + Write-Host "Installing module Microsoft.Graph v1.7.0" + Install-Module Microsoft.Graph -RequiredVersion 1.7.0 -Repository PSGallery -Scope CurrentUser -AcceptLicense -Force -AllowClobber Write-Host "Finished installing dependencies" displayName: Install script dependencies workingDirectory: '$(Build.SourcesDirectory)' diff --git a/scripts/categorizeErrors.ps1 b/scripts/categorizeErrors.ps1 index bc3691059..3d84b7eac 100644 --- a/scripts/categorizeErrors.ps1 +++ b/scripts/categorizeErrors.ps1 @@ -34,7 +34,7 @@ $pathNotFound = @() $invalidStart = @() $other = @() -$files = Get-ChildItem -Path $trxFolderPath -Filter *.trx +$files = Get-ChildItem -Path $trxFolderPath -Exclude "http*" $SpecificErrorPattern = "/home/vsts/work/1/a/Snippets/" foreach ($trxFilePath in $files){ Write-Host "Processing file $trxFilePath" diff --git a/scripts/getWorkloadOwner.ps1 b/scripts/getWorkloadOwner.ps1 index 4073d09ee..06910f2ea 100644 --- a/scripts/getWorkloadOwner.ps1 +++ b/scripts/getWorkloadOwner.ps1 @@ -17,7 +17,7 @@ Function Connect-Tenant [Bool]$IsEducation = $false ) $appToken = Get-DefaultAppApplicationToken -IsEducation $IsEducation - Connect-MgGraph -AccessToken ($appToken | ConvertTo-SecureString -AsPlainText -Force) | Out-Null + Connect-MgGraph -AccessToken $appToken | Out-Null } function Get-AppSettings () @@ -95,7 +95,7 @@ function Get-WorkloadOwner { if ($Endpoint -contains "me/") { $userToken = Get-DelegatedAppToken - Connect-MgGraph -AccessToken ($userToken.access_token | ConvertTo-SecureString -AsPlainText -Force) | Out-Null + Connect-MgGraph -AccessToken $userToken.access_token | Out-Null } $ownerEndpoint = $Endpoint.contains("?") ? ($Endpoint + "&`$whatif"):($Endpoint + "?`$whatif") $fullUrl = $IsFullUri ? $Uri : "https://graph.microsoft.com/$($GraphApiVersion)/$ownerEndpoint"