Notification SMS

Setup walkthrough

How your administrator turns on FirstNet SMS, replayed in Azure Cloud Shell (about 2 minutes). Names, IDs and codes are examples. For help, contact sales@firstnet.co.za.

  1. 1. Run the script
  2. 2. Send the setup code
  3. 3. Turn on a pilot
  4. 4. Widen
  5. 5. Undo
Azure Cloud Shell · PowerShell
Requesting a Cloud Shell.Succeeded.
Connecting terminal...
 
Welcome to Azure Cloud Shell
 
PS /home/admin> iwr https://raw.githubusercontent.com/FirstNet-Technology-Services-PTY-Ltd/ExternalPhoneProvider-AzureFunction-Sample/aab3dcf/setup/Enable-FirstNetSms.ps1 -OutFile Enable-FirstNetSms.ps1; ./Enable-FirstNetSms.ps1
Tenant: Contoso Ltd (11111111-2222-3333-4444-555555555555)
Turn on FirstNet SMS for this tenant? [y/N]: y
[1] Contoso Production (aaaaaaaa-0000-4000-8000-000000000001)
[2] Contoso Dev/Test (aaaaaaaa-0000-4000-8000-000000000002)
Subscription number: 1
Checking prerequisites
[ OK ] Microsoft Entra ID P1 or P2
[ OK ] Directory roles
[ OK ] Owner of the subscription
[ OK ] Flex Consumption available in southafricanorth
Registering resource provider Microsoft.Web ...
Running Microsoft's setup with FirstNet's settings. Review its plan and answer Y to deploy.
If it asks which application to use, press Enter to create a new one.
⋯ Microsoft's setup shows its plan, you answer Y, and it deploys. This takes several minutes. ⋯
 
Keeping one Function instance warm (avoids a slow first sign-in)
Setup finished. Email this setup code to FirstNet (it contains no secrets):
 
FNSMS1.eyJ2IjoxLCJ0ZW5hbnRJZCI6IjExMTExMTExLTIyMjItMzMzMy00NDQ0LTU1NTU1NTU1NTU1NSIsImFwcElkIjoiMGExYjJjM2QtNGU1Zi00YTZiLThjN2QtOWUwZjFhMmIzYzRkIiwiZW5kcG9pbnQiOiJodHRwczovL2ZuZXRzbXMtZXBwLWZ1bmMtM2Y5YzJhNzEuYXp1cmV3ZWJzaXRlcy5uZXQvYXBpL1NlbmRPdHAiLCJvcmciOiJDb250b3NvIEx0ZCIsImNvbnRhY3QiOiJhZG1pbkBjb250b3NvLmNvbSIsInJlc291cmNlR3JvdXAiOiJmbmV0c21zLWVwcC1yZy0zZjljMmE3MSIsImZ1bmN0aW9uQXBwIjoiZm5ldHNtcy1lcHAtZnVuYy0zZjljMmE3MSIsInJlZ2lvbiI6InNvdXRoYWZyaWNhbm9ydGgiLCJjcmVhdGVkQXQiOiIyMDI2LTExLTAyVDA5OjIxOjQ0LjAwMDAwMDBaIn0
 
It holds: tenant 11111111-2222-3333-4444-555555555555, app 0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d, https://fnetsms-epp-func-3f9c2a71.azurewebsites.net/api/SendOtp, Contoso Ltd, admin@contoso.com.
When FirstNet confirms, run: ./Enable-FirstNetSms.ps1 -Activate
⋯ Waiting for FirstNet's confirmation. ⋯
PS /home/admin> ./Enable-FirstNetSms.ps1 -Activate -PilotUsers lindiwe@contoso.com,pieter@contoso.com
Has FirstNet confirmed that your setup code is approved? [y/N]: y
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code D7KQ3XRZP to authenticate.
Creating security group FirstNet-SMS-Pilot
added lindiwe@contoso.com
added pieter@contoso.com
Pilot group FirstNet-SMS-Pilot (7c9e6679-7425-40de-944b-e07fc1f90ae7): lindiwe@contoso.com, pieter@contoso.com
 
Plan: SMS enabled for the pilot group only; 100% of its SMS sign-ins go through FirstNet.
Apply this change? [y/N]: y
SMS policy backup: /home/admin/firstnet-sms/sms-policy-backup-20261102-093015.json
Keep a copy outside Cloud Shell (Manage files > Download). To undo later:
./Enable-FirstNetSms.ps1 -Rollback '/home/admin/firstnet-sms/sms-policy-backup-20261102-093015.json'
 
SMS policy now: state enabled; targets 7c9e6679-7425-40de-944b-e07fc1f90ae7
provider https://fnetsms-epp-func-3f9c2a71.azurewebsites.net/api/SendOtp; evaluation False; 100%
Changes can take a few minutes (Microsoft says up to an hour) to reach sign-ins.
 
Next: make sure pilot users have a mobile number registered (or a Conditional Access policy requiring MFA for the group), sign in, and tell FirstNet the time. FirstNet sees each SMS in its console.
Widen later with: ./Enable-FirstNetSms.ps1 -Expand -Percent 100 [-AllUsers]
FirstNetFirstNet: your verification code is 482913.
PS /home/admin> ./Enable-FirstNetSms.ps1 -Expand -Percent 100 -AllUsers
Change the SMS policy: SMS for all users, 100% through FirstNet? [y/N]: y
SMS policy backup: /home/admin/firstnet-sms/sms-policy-backup-20261102-101204.json
Keep a copy outside Cloud Shell (Manage files > Download). To undo later:
./Enable-FirstNetSms.ps1 -Rollback '/home/admin/firstnet-sms/sms-policy-backup-20261102-101204.json'
 
SMS policy now: state enabled; targets all_users
provider https://fnetsms-epp-func-3f9c2a71.azurewebsites.net/api/SendOtp; evaluation False; 100%
Changes can take a few minutes (Microsoft says up to an hour) to reach sign-ins.
# Put the SMS policy back exactly as it was:
PS /home/admin> ./Enable-FirstNetSms.ps1 -Rollback '<backup file>'
 
# Show the setup code again:
PS /home/admin> ./Enable-FirstNetSms.ps1 -SetupCode
Open Azure Cloud Shell. Go to shell.azure.com, sign in as your organisation's administrator and choose PowerShell.
Download and run the script. Paste the command from the portal. It downloads the script from FirstNet's public GitHub repository and runs it. Confirm your tenant and pick the subscription to use.
Prerequisite checks. The script checks your licences, directory roles, Azure access and region. If anything is marked FAIL, nothing is created: fix it and run the script again.
Microsoft's setup. Microsoft's own setup deploys the phone-provider Function in your subscription. Review its plan and answer Y. If it asks which application to use, press Enter.
Copy the setup code. Copy the setup code and email it to sales@firstnet.co.za. It holds only identifiers, no passwords or secrets.
FirstNet approves. FirstNet checks the setup code, approves it and lets you know. Wait for that before the next step.
Turn on FirstNet for a pilot group. Turn it on for one or two test users. The script asks you to sign in to Microsoft Graph with a code, creates the pilot group and shows its plan before changing anything.
Backup, then the change. Download the backup file (Manage files > Download) and keep it. With it you can put everything back exactly as it was.
Test a sign-in. A pilot user signs in and chooses a text message. The code now comes from FirstNet. Tell FirstNet the time of the test.
Widen the rollout. When the pilot works, widen it. This example sends every SMS sign-in through FirstNet and opens SMS to all users. You can start with a smaller percentage, but reach 100% well before 1 February 2027, when Microsoft retires its own SMS codes: sign-ins not routed through FirstNet don't fall back to it.
Undo, and where to look. To undo, run the script with -Rollback and a backup file. Your usage and spend are on mfa.firstnet.co.za. For help, email sales@firstnet.co.za.
Animations are turned off on this device. Read the walkthrough as text.