Maybe this blogpost is helpful:
https://blog.ctglobalservices.com/azure/jgs/azure-automation-using-webhooks-part-1-input-data/
From this blog post I got the information how to provide Firstname and Lastname via webhook for a "Create User" runbook.
## These are just snippets for demoing - removed some lines of the full script
##First snippet
[CmdletBinding()]
Param
([object]$WebhookData)
$VerbosePreference = 'continue'
if ($WebHookData)
{
$WebhookName = $WebHookData.WebhookName
$WebhookHeaders = $WebHookData.RequestHeader
$WebhookBody = $WebHookData.RequestBody
$From = $WebhookHeaders.From
$Input = (ConvertFrom-Json -InputObject $WebhookBody)
Write-Verbose "WebhookBody: $Input"
}
## Second Snippet
$firstname = $Input.FirstName
$lastname = $Input.LastName
## Third Snippet
$adDisplayName = $firstname +" "+$lastname
$newUserName = "$firstname.$lastname"
## Fourth snippet
New-ADuser -Path "$adOU"`
-Name "$adDisplayName"`
-DisplayName "$adDisplayName"`
-GivenName "$firstName"`
-Surname "$lastName"`
### some more things
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten