In the following 3 articles, we’ll see how to automate the user creation, with Azure Function, with a SharePoint Online interface and with a PowerApps application.

To start in this first article, we will see how to create our new user, with an Azure Function.

We will use the following PowerShell script for this demonstration:

As you can understand, you will need:

  • An Azure Function
  • An AutomationAccount application settings, in the Azure Function, with an account that has rights to the Azure AD to create new users
  • Create a Password application settings, in the Azure Function, with the password of the previous account
  • To switch your Azure Function Web App to 64-bit (in Application Settings)
  • Downgrading your Azure Function from version 2 to version 1 to use PowerShell because PowerShell is not yet available in version 2: -versions


  • To create a new function, named cloudyjourney in my case, with PowerShell language and with type http trigger :



When you’ve all of these prerequisites, go in the Integrate part of your function, and select just the POST method that will be allow to receive call via the webhook (Mode) :


You can test your function, by clicking on Run and by using the following JSON code uin the Request body part, on the right :


Creation worked correctly :


And I can now login with my new user :


VSAN from StarWind is software-defined storage (SDS) solution created with restricted budgets and maximum output in mind. It pulls close to 100% of IOPS from existing hardware, ensures high uptime and fault tolerance starting with just two nodes. StarWind VSAN is hypervisor and hardware agnostic, allowing you to forget about hardware restrictions and crazy expensive physical shared storage.

Build your infrastructure with off-the-shelf hardware, scale however you like, increase return on investment (ROI) and enjoy Enterprise-grade virtualization features and benefits at SMB price today!


My script is working. Last point, in your function, click on Get function URL and get the URL that we will use to call our webhook in SharePoint :


In the next article, we will see how to create a list in SharePoint, to start automatically our Azure Function, through the webhook, from SharePoint.

Views All Time
Views Today
Back to blog
The following two tabs change content below.
Florent Appointaire
Florent Appointaire is Microsoft Engineer with 5 years of experience, specialized in Cloud Technologies (Public/Hybrid/Private). He is a freelance consultant in Belgium from the beginning of 2017. He is MVP Cloud and Datacentre Management. He is MCSE Private Cloud and Hyper-V certified. His favorite products are SCVMM, SCOM, Windows Azure pack/Azure Stack and Microsoft Azure.