Hi i’m making an onboarding flow which in Power Automate cloud which will create a user, assign them to a department and add them to a distribution list accodrding to their department and generate aliases based on their email adress.
In order to accomplish this I need to use a Powershell script running in an Azure Automation Runbook since Power Automate does not allow me to assign someone to a distribution list.
I have managed to successfully create a Power Automate flow which creates users, as well as a Powershell script that a user to a distribution list and creates the alias. However I don’t know how to "tie these two together". I know i need to use the "Create Job" action for Azure Automate in Power Automate however I don’t know how exactly I would get powershell to recognize variables generated by Power Automate.
2
Answers
You can Azure Automation connectors which is available for Power Automate Premium Class. For more information refer this and this document.
I do agree with @swathidhanwada, I have reproduced from my end and see this is working fine when I pass
UserPrincipleName
in JSON format.Below is the flow in my logic app
Code view of the
Create job
stepHere is the script in my runbook
Results: