Creating an employee self-service mobile app Pt 1
·2 min read·Paul Logan

The Brief
Create a mobile app for company employees to view holiday entitlement and book holiday requests.
Requirements:
- Works on both Android and Apple phones.
- Does not require user accounts to be registered in our company Active Directory.
- App should provide self-service registration and authenticate with minimal interaction required from HR and/or IT.
Technologies
- Progressive Web App
- Azure Static Web Apps
- Azure DevOps
- Entra External ID
Steps
Create project in Azure DevOps
- Create project in Azure DevOps
- Initialize main branch with a README or gitignore
- Select VisualStudio .gitignore
Entra ID Tenant - Create SWA
- Create SWA in main Entra ID tenant
- Plan Type = Standard
- Deployment details
- Source = Azure DevOps
- Build Details = Custom
- App location = “/src”
- Api location = “/api”
- Output location = ""
Create Customer Tenant
Not all Tenant Creations are equal:
Ensure you are in your company's main Microsoft Entra ID tenant when performing this step. When writing this post, I selected to create a tenant whilst already in a Customer tenant I had created earlier. The options for the "Select a tenant type" had the "Azure AD B2C" option disabled.
Subscription Requirement:
"If you're creating a customer tenant for the first time, you have the option to create a trial tenant that doesn't require an Azure subscription."
Register an app in the Customer Tenant
- App registrations
- Supported account types = Single tenant
- Redirect URIs
- Platform = Web
- URI = https://«SWA-URL»azurestaticapps.net/.auth/login/aad/callback
- Implicit grant = ID tokens
- API Permissions
- offline_access
- openid
- profile
Create User Flow
- Enable guest self-service sign up
- Create new user flow
- Identity Providers = Email one-time passcode
- User attributes = Given Name, Surname, Display Name
Configure SWA in Entra ID Tenant
- Add ClientSecret and ClientID to SWA configuration
Coding the SWA
Build Error:
Oryx could not find a 'build' or 'build:azure' script in the package configuration.
Solution:
Add skip_app_build: true
Build Error:
Failed to find a default file in the app artifacts folder (/).
Solution:
Change app_location from "/" to "./src".