Welcome to King of Ofuro's "Intune Account-Driven User Enrollment" repository.
This repository contains an Azure Function written in TypeScript that facilitates account-driven user enrollment for Microsoft Intune on Apple devices.
The accountdrivenfunc
function handles HTTP requests and responds with the necessary server configuration for device enrollment. It returns a JSON object containing the BaseURL
for the Intune enrollment server, which includes your Azure Active Directory Tenant ID.
- Node.js (version 14 or higher)
- Azure Functions Core Tools
- An Azure account with permission to create resources
- TypeScript installed globally (
npm install -g typescript
)
- Clone the repository
git clone https://github.com/yourusername/intune-account-driven-user-enrollment.git
- Navigate to the project directory
cd intune-account-driven-user-enrollment
- Install dependencies
npm install
- Set up environment variables
- Create a .env file in the root directory.
- Add your Azure AD Tenant ID:
TENANT_ID=your-tenant-id
- Build the project
npm run build
-
Start the Azure Function
-
Access the function endpoint
- Navigate to:
http://localhost:7071/.well-known/com.apple.remotemanagement
- Navigate to:
- Log in to Azure
az login
- Create a Resource Group
az group create --name YourResourceGroupName --location YourRegion
- Create a Storage Account
az storage account create --name yourstorageaccount --location YourRegion --resource-group YourResourceGroupName --sku Standard_LRS --allow-blob-public-access false
- Create a Function App
az functionapp create --resource-group YourResourceGroupName --consumption-plan-location YourRegion --runtime node --runtime-version 18 --functions-version 4 --name yourfunctionapp --storage-account yourstorageaccount
- Deploy the Function
func azure functionapp publish yourfunctionapp
-
Purchase a custom domain (e.g.,
yourdomain.com
). -
Configure DNS settings with your domain registrar to point to your Azure Function App.
-
Add Custom Domain in Azure
- Navigate to your Function App in the Azure Portal.
- Go to Custom domains and add your domain.
-
Secure with SSL
- In the Azure Portal, go to TLS/SSL settings.
- Add a Binding to secure your custom domain with HTTPS.
- Endpoint:
https://yourdomain.com/.well-known/com.apple.remotemanagement
- Method:
GET
- Response: JSON object with server information for device enrollment.
Contributions are welcome. Please open an issue or submit a pull request.