Skip to content

Commit 9d29876

Browse files
committed
switch to asapp for api configs
1 parent 9ad27a5 commit 9d29876

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Modules/CIPPCore/Public/Authentication/New-CIPPAPIConfig.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ function New-CIPPAPIConfig {
1919

2020
try {
2121
if ($AppId) {
22-
$APIApp = New-GraphGetRequest -uri "https://graph.microsoft.com/v1.0/applications(appid='$($AppId)')" -NoAuthCheck $true
22+
$APIApp = New-GraphGetRequest -uri "https://graph.microsoft.com/v1.0/applications(appid='$($AppId)')" -NoAuthCheck $true -AsApp $true
23+
Write-Information "Found existing app with AppId $AppId"
2324
} else {
2425
$CreateBody = @{
2526
api = @{

0 commit comments

Comments
 (0)