Skip to content

Instantly share code, notes, and snippets.

View ChrFrohn's full-sized avatar

Christian Frohn ChrFrohn

View GitHub Profile
{
"operationStatus": "@{if(equals(actions('CFP-Exchange-Exchange-UpdateSharedMailboxes').status, 'Succeeded'), 'completed', 'failed')}"
}
{
"data": {
"operationStatus": "@{if(equals(actions('Exchange-UpdateSharedMailboxes').status, 'Succeeded'), 'completed', 'failed')}"
}
{
"bindings": [
{
"authLevel": "function",
"type": "httpTrigger",
"direction": "in",
"name": "Request",
"methods": ["post"]
},
{
{
"UserPrincipalNameOrObjectId": "@{triggerBody()?['data']?['subject']?['userPrincipalName']}"
}
Write-Output "ERROR: Failed to authenticate to Microsoft Graph"
Exit 1
Write-Output "SUCCESS: Completed for user: $UserPrincipalName"
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
StatusCode = [HttpStatusCode]::OK
Body = "SUCCESS: Completed for user: $UserPrincipalName"
})
param (
[Parameter(Mandatory = $true)]
[string]$UserPrincipalNameOrObjectId
)
Write-Output "ERROR: Failed to authenticate to Microsoft Graph"
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
StatusCode = [HttpStatusCode]::InternalServerError
Body = "ERROR: Failed to authenticate to Microsoft Graph"
})
return
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"
@ChrFrohn
ChrFrohn / AzureFunctionDeploy.yml
Created June 20, 2026 15:15
AzureFunctionDeploy.yml
trigger:
- main
variables:
azureSubscription: '<Your-Service-Connection-Name>'
functionAppName: '<Your-Azure-Functions-Name>'
vmImageName: 'windows-latest'
workingDirectory: '$(System.DefaultWorkingDirectory)/<RepoPath>/<RepoPath>/FunctionApp'
stages: