Skip to content

Commit 58e3a36

Browse files
appIdTroubleshooting
1 parent 94f1013 commit 58e3a36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/CIPPCore/Public/GraphHelper/Get-GraphToken.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ function Get-GraphToken($tenantid, $scope, $AsApp, $AppID, $AppSecret, $refreshT
1010
$Filter = "PartitionKey eq 'AppCache' and RowKey eq 'AppCache'"
1111
$AppCache = Get-CIPPAzDataTableEntity @ConfigTable -Filter $Filter
1212
#force auth update is appId is not the same as the one in the environment variable.
13+
Write-Host "My appId pre-launch is $($env:ApplicationID) and the one in the cache is $($AppCache.ApplicationId)"
1314
if ($AppCache.ApplicationId -and $env:ApplicationID -ne $AppCache.ApplicationId) {
1415
Write-Host "Setting environment variable ApplicationID to $($AppCache.ApplicationId)"
1516
$CIPPAuth = Get-CIPPAuthentication
1617
}
17-
18-
#If the $env:<$tenantid> is set, use that instead of the refreshtoken for all tenants.
18+
Write-Host "My appId post-launch is $($env:ApplicationID) and the one in the cache is $($AppCache.ApplicationId)"
1919
$refreshToken = $env:RefreshToken
2020
if (!$tenantid) { $tenantid = $env:TenantID }
2121
#Get list of tenants that have 'directTenant' set to true

0 commit comments

Comments
 (0)