Advanced Setup
The Advanced Setup allows you to assign permissions in a more granular and customized way. This approach is more flexible but more complex and requires running the RealmJoin PowerShell module.
The RealmJoin PowerShell module automates the setup of your RealmJoin tenant. It:
Creates the required Microsoft Entra ID service principals for the RealmJoin applications
Assigns the appropriate Microsoft Graph permissions based on the features you select
Configures RealmJoin features (Portal, Intune LAPS, Autopilot, device actions, remediation scripts, security features)
Cleans up legacy applications from previous configurations
The module is published on the PowerShell Gallery.
Prerequisites
PowerShell 5.1 or later (Windows PowerShell or PowerShell 7)
An account that can create service principals and grant application permissions in Microsoft Entra ID — for example Global Administrator or Privileged Role Administrator
Sign-in happens through
Connect-AzAccount, which uses the Azure PowerShell first-party application. Tenants that restrict user consent may need an administrator to grant admin consent to that application first.Access to the PowerShell Gallery to install the module
An Azure subscription is only needed for the Azure resources (Set-RJLogAnalyticsWorkspace, Set-RJAutomationAccount). New-RJTenant and Update-RJTenant work in a tenant without any subscription; sign in to it with Connect-AzAccount -Tenant <tenant-id> first.
Recommended Setup
The setup command displayed by the RealmJoin Portal runs Complete-RJTenantOnboarding (alias of Update-RJTenant) without a feature selection. It assigns the permissions of the mandatory feature and all default features:
Core portal functionality (
RealmJoinPortal, mandatory)Intune LAPS (
IntuneLAPS)Sign-in data (
ShowSignin)Autopilot (
Autopilot)Intune device actions (
DeviceIntuneActions)Remediation scripts (
DeviceHealthScript)BitLocker recovery keys (
BitLockerRecoveryKeys)Windows device update enrollment (
WindowsDeviceUpdateEnrollment)
Features that are already configured in the tenant, for example SecurityFeatures or Client, are kept. To add all features or individual features, see Other Commands.
Open PowerShell on Windows/Mac
We recommend installing and running the RealmJoin PowerShell module in a freshly opened PowerShell session on your own device rather than in Azure Cloud Shell. The module requires a fixed minor version line of each Az.* module (Az.Accounts 5.5.x, Az.Resources 10.2.x, Az.Automation 1.12.x); if a different version is already loaded in the session — which is typically the case in Cloud Shell — it stops with a version conflict that cannot be resolved without opening a new session.
An elevated ("Run as administrator") session is not required: modules are installed with -Scope CurrentUser.
Copy and Run the RealmJoin Onboarding Script
The script will prompt you to sign in to Azure. Use an account that can create service principals and grant application permissions, for example your Global Administrator.
The token in the command links the run to your tenant in the RealmJoin Portal. It is valid for one hour; if it has expired, open the Advanced Setup page in the portal again to get a command with a new token.

Begin using RealmJoin
After the permissions have been assigned, the command sends the token to the RealmJoin API. The Advanced Setup page in the portal checks periodically whether the token has been used and then redirects you to the portal. Keep the page open while the command runs.
If the RealmJoin Portal service principal did not exist in the tenant before, the command also opens the RealmJoin Portal in your browser.
Other Commands
Interactive Setup
For a guided, menu-driven experience covering tenant setup, configuration changes, the Log Analytics workspace and the Automation Account:
To review the available features before configuring anything:
Custom Configuration
New-RJTenant configures a tenant with exactly the selected features. Use it for tenants that are not configured yet.
Default Features
Enables the mandatory core portal functionality plus the default optional features (all except Client, SecurityFeatures and AndroidApps):
Minimal Features (only mandatory features)
Full Feature Set
Read-Only Permissions
Assigns read-only permissions where available (for example, Group.ReadWrite.All becomes Group.Read.All):
Three features have no read-only variant and keep their permissions with -ReadOnly:
DeviceIntuneActions
DeviceManagementManagedDevices.PrivilegedOperations.All
WindowsDeviceUpdateEnrollment
WindowsUpdates.ReadWrite.All
AndroidApps
DeviceManagementConfiguration.ReadWrite.All
For a configuration without write permissions, leave these features out:
Custom Feature Selection
Updating Existing Configuration
Update-RJTenant adjusts an already-configured tenant. The alias Complete-RJTenantOnboarding can be used interchangeably with Update-RJTenant.
Without
-Features,-All,-AddFeaturesor-RemoveFeatures, the features already configured in the tenant are kept and the default features are added. Nothing is removed.-Featuresreplaces the configuration: configured features that are not in the list are removed, including their service principal. An empty list is rejected.-AddFeaturesand-RemoveFeatureschange only the named features.Every run also removes legacy RealmJoin applications from the tenant, see Switching from Quick Setup.
Add New Features
Remove Features
Switch to Read-Only Permissions
Switches the configured features and the default features to their read-only permissions. The features listed under Read-Only Permissions keep their write permissions.
Combined with -AddFeatures, -ReadOnly applies only to the added features; the permissions of the features already configured stay unchanged.
Preview Changes
Azure Resources
The module also deploys the companion Azure resources RealmJoin uses. These are not Graph permission features and are not selected with -Features:
Set-RJLogAnalyticsWorkspace— deploys the Log Analytics workspace with its custom tables and Data Collection Rules, see Connecting Azure Log Analytics WorkspaceSet-RJAutomationAccount— deploys the RealmJoin Automation Account with a managed identity and the permissions it needs, see Connecting Azure Automation
Both commands are generated with the matching parameters and an onboarding token on the relevant settings page in the RealmJoin Portal.
Available Features
Use these feature names with the -Features, -AddFeatures, and -RemoveFeatures parameters. Mandatory features are always enabled. The default configuration (New-RJTenant without parameters) enables the features marked below; SecurityFeatures, Client and AndroidApps have to be selected explicitly.
RealmJoinPortal
Core portal functionality for user self-service and admin interaction (mandatory)
☑️
IntuneLAPS
Retrieve and manage local admin passwords via Intune LAPS
☑️
ShowSignin
Display user sign-in history and audit logs
☑️
Autopilot
View Windows Autopilot deployment profiles and status
☑️
DeviceIntuneActions
Execute privileged device actions (sync, restart, wipe, etc.)
☑️
DeviceHealthScript
Manage and deploy PowerShell remediation scripts to devices
☑️
BitLockerRecoveryKeys
View BitLocker recovery keys for managed devices
☑️
WindowsDeviceUpdateEnrollment
Manage Windows Device Updates enrollment
☑️
Client
RealmJoin Agent — client application for device management
AndroidApps
Android app deployment through Managed Google Play (DeviceManagementConfiguration.ReadWrite.All)
Switching from Quick Setup
A tenant onboarded with Quick Setup uses the RealmJoin Portal - Core Features app registration, which holds all portal permissions. To move it to Advanced Setup, go to Organization → Features in the RealmJoin Portal and select Go to advanced mode on the Advanced setup card. The portal then shows the onboarding command with a token, as described under Recommended Setup.

When the command runs, the module creates the service principals for the selected features and removes the RealmJoin Portal - Core Features app registration as a legacy application. Once the new permissions are in place, the portal switches the tenant to Advanced Setup.
Troubleshooting
If the module cannot be found, confirm the PowerShell Gallery is available and reinstall:
Getting Help
Last updated
Was this helpful?