Hi,
Based on the description, I assume that you have working solution that does following:
- On SharePoint item creation, call Webhook passing GivenName and Surname.
- Webhook (azure runbook) creates account on-premise and online.
Then, you would like to update the item with userprincipalname of the newly created account.
Updating SharePoint list item will require itemId, hence I can propose following update:
- On SharePoint item creation, call Webhook passing GivenName, Surname and ItemId.
- Webhook (azure runbook) creates account on-premise + online, and store the userprincipalname and itemId in Azure storage queue.
- Add Logic App that monitor Azure storage queue, and update SharePoint list based on itemId. It will update userprincipalname.
Happy coding.