Created
June 20, 2026 15:22
-
-
Save ChrFrohn/3b3249739b6a4a053cc3cb334aaa1f72 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using namespace System.Net | |
| param($Request, $TriggerMetadata) | |
| $UserPrincipalNameOrObjectId = $Request.Body.UserPrincipalNameOrObjectId | |
| if (-not $UserPrincipalNameOrObjectId) { | |
| Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{ | |
| StatusCode = [HttpStatusCode]::BadRequest | |
| Body = "ERROR: UserPrincipalNameOrObjectId is required in the request body" | |
| }) | |
| return | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment