Deploy Some Test Azure Resources & Azure AD Users

Simone B
3 min readSep 3, 2021

--

This blog series documents the end to end setup for a demo Azure environment. Starting with setting up an Azure Subscription, configuring VSCode, cloning a GitHub repo, some basic Azure resource deployment and finally setting up Azure Lighthouse and Azure Arc so we can test it out.

Part 1 — Azure Subscription Signup
Part 2 — Switch from PowerShell ISE to Visual Studio Code
Part 3 — Get Started with a GitHub Repo (fork, clone, edit & push the repo)
Part 4 — Deploy Some Test Azure Resources & Azure AD Users
Part 5 — Use PowerShell to configure Lighthouse and Manage Resources in Another Subscription

If you’re using my basic Azure deployment scripts, open VSCode, select open folder and select the basic_azure repo that you cloned earlier.

The ConfigureCoreAzure file has everything we need in one place to keep it simple. Edit the variables section to suit your Azure subscription and save it.

Variables Section is Filled Out

To run each section of the deployment script, highlight the lines you want to run and hit F8 or right click and select run selection just like you would in the PowerShell ISE.

Run a section of the script using VSCode

I wont step through running the script, the comments within it tell you what's happening in each section. When its done you’ll have a basic environment configured which includes:

  • A core-infra and containers resource group
  • Some demo Linux container instances, an Automation Account, a few Windows VM’s, a KeyVault and a simple Virtual Network.
  • Hopefully you also configured usage and budget alerts so you don't use up all of your credits!
Basic Azure infrastructure that has been deployed

NB:
If you’re going to test out Azure Lighthouse and Azure Arc you need
two environments with working infrastructure. If you’re second environment is empty you can use this same script to populate it with some basic infrastructure.

Optional — Create Some Bulk Azure AD Test Users

If you need some fake Azure AD users to assign Lighthouse permissions to, we can create them in bulk:

  • Open the UserCreateTemplate.csv in the basic_azure repo
  • Find/Replacedomainname.onmicrosft.comwith your Azure AD Domain Name
  • Save the file as a .CSV
Edit the Bulk Azure AD User File
  • Sign in to your Azure AD organization with an account that is a User administrator in the organization
  • Select All Users> Bulk Operations> Bulk Create
  • Upload your users file
  • When you select the file and click Submit, validation of the CSV file starts
  • After the file contents are validated, you’ll see File uploaded successfully
  • When your file passes validation, select Submit to start the Azure bulk operation that imports the new users.
  • Once its done, you’ll have about 500 test users that you can allocate to groups, enable for MFA and test with as required.

--

--

Simone B

I love data, nerding, riding, lifting up heavy things & obnixious witty humour. Posts are mine & don’t represent my employer. She/her 🌈