Skip to content

Commit a3c90a8

Browse files
committed
Update Get-GraphToken.ps1
1 parent 1b4a7a6 commit a3c90a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function Get-GraphToken($tenantid, $scope, $AsApp, $AppID, $AppSecret, $refreshT
66
if (!$scope) { $scope = 'https://graph.microsoft.com/.default' }
77
if (!$env:SetFromProfile) { $CIPPAuth = Get-CIPPAuthentication; Write-Host 'Could not get Refreshtoken from environment variable. Reloading token.' }
88
#If the $env:<$tenantid> is set, use that instead of the refreshtoken for all tenants.
9-
$refreshToken = $env:Refreshtoken
9+
$refreshToken = $env:RefreshToken
1010
$ClientType = Get-Tenants -IncludeErrors -TenantFilter $tenantid
1111
if ($clientType.delegatedPrivilegeStatus -eq 'directTenant') {
1212
$ClientRefreshToken = Get-Item -Path "env:\$($clientType.customerId)" -ErrorAction SilentlyContinue

0 commit comments

Comments
 (0)