Skip to content

Commit 512464b

Browse files
corrected token generation
1 parent 02a318b commit 512464b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Setup/Invoke-ExecAddTenant.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function Invoke-ExecAddTenant {
3131
# Create new tenant entry
3232
try {
3333
# Get tenant information from Microsoft Graph
34-
$headers = @{ Authorization = "Bearer $($request.body.access_token)" }
34+
$headers = @{ Authorization = "Bearer $($request.body.accessToken)" }
3535
$Organization = (Invoke-RestMethod -Uri 'https://graph.microsoft.com/v1.0/organization' -Headers $headers -Method GET -ContentType 'application/json' -ErrorAction Stop).value
3636
$displayName = $Organization.displayName
3737
$Domains = (Invoke-RestMethod -Uri 'https://graph.microsoft.com/v1.0/domains?$top=999' -Headers $headers -Method GET -ContentType 'application/json' -ErrorAction Stop).value

0 commit comments

Comments
 (0)