File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Users Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11using namespace System.Net
22
3- Function Invoke-ExecSendPush {
3+ function Invoke-ExecSendPush {
44 <#
55 . FUNCTIONALITY
66 Entrypoint
@@ -33,15 +33,15 @@ Function Invoke-ExecSendPush {
3333 Start-Sleep 1
3434 $ClientToken = Get-ClientAccess - uri $uri - body $body - count $count
3535 } else {
36- Throw " Could not get Client Token: $_ "
36+ throw " Could not get Client Token: $_ "
3737 }
3838 }
3939 return $ClientToken
4040 }
4141
4242
4343 # Get all service principals
44- $SPResult = New-GraphGetRequest - uri " https://graph.microsoft.com/beta/servicePrincipals?`$ top=999&`$ select=id,appId" - tenantid $TenantFilter
44+ $SPResult = New-GraphGetRequest - uri " https://graph.microsoft.com/beta/servicePrincipals?`$ top=999&`$ select=id,appId" - tenantid $TenantFilter - AsApp $true
4545
4646 # Check if we have one for the MFA App
4747 $SPID = ($SPResult | Where-Object { $_.appId -eq $MFAAppID }).id
@@ -52,7 +52,7 @@ Function Invoke-ExecSendPush {
5252 $SPBody = [pscustomobject ]@ {
5353 appId = $MFAAppID
5454 }
55- $SPID = (New-GraphPostRequest - uri ' https://graph.microsoft.com/v1.0/servicePrincipals' - tenantid $TenantFilter - type POST - body $SPBody ).id
55+ $SPID = (New-GraphPostRequest - uri ' https://graph.microsoft.com/v1.0/servicePrincipals' - tenantid $TenantFilter - type POST - body $SPBody - AsApp $true ).id
5656 }
5757
5858
You can’t perform that action at this time.
0 commit comments