Skip to content

Commit

Permalink
Merge pull request #2716 from microsoft/dev
Browse files Browse the repository at this point in the history
Give error if scopes is wrong
  • Loading branch information
freddydk authored Sep 29, 2022
2 parents fca9346 + 9cf781d commit 617899e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions AL-Go/New-ALGoAppSourceContext.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ function New-ALGoAppSourceContext {
[switch] $skipTest
)

if ($authContext.scopes -ne "https://api.partner.microsoft.com/.default" -and $authContext.scopes -ne "https://api.partner.microsoft.com/") {
Write-Host -ForegroundColor Red "AuthContext.Scopes is '$($authContext.Scopes)', should have been 'https://api.partner.microsoft.com/.default'"
}

if ($authContext.ClientSecret) {
$appSourceContext = [ordered]@{
"clientID" = $authContext.clientID
Expand Down

0 comments on commit 617899e

Please sign in to comment.