Skip to content

Commit 5950eac

Browse files
authored
Merge pull request #126 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 77a1ec0 + 91d48b0 commit 5950eac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Endpoint/Autopilot/Invoke-AddAPDevice.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Function Invoke-AddAPDevice {
3838
}
3939
$body = ConvertTo-Json -Depth 10 -Compress -InputObject @($body)
4040
Write-Host $body
41-
$GraphRequest = (New-GraphPostRequest -returnHeaders $true -uri "https://api.partnercenter.microsoft.com/v1/$($CurrentStatus.items.deviceslink.uri)" -body $body -scope 'https://api.partnercenter.microsoft.com/user_impersonation')
41+
$GraphRequest = (New-GraphPostRequest -returnHeaders $true -uri "https://api.partnercenter.microsoft.com/v1/customers/$TenantFilter/deviceBatches/$groupname/devices" -body $body -scope 'https://api.partnercenter.microsoft.com/user_impersonation')
4242
} else {
4343
$body = '{"batchId":"' + $($GroupName) + '","devices":' + $Devices + '}'
4444
$GraphRequest = (New-GraphPostRequest -returnHeaders $true -uri "https://api.partnercenter.microsoft.com/v1/customers/$TenantFilter/DeviceBatches" -body $body -scope 'https://api.partnercenter.microsoft.com/user_impersonation')

0 commit comments

Comments
 (0)