For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

The required Azure PowerShell modules (Az.Accounts, Az.Resources, Az.Automation) are installed automatically in the versions the module pins, for the current user, the first time you run a command.

  • 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.

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.

1

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.

2

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.

About 6>&1: These commands write their progress updates to PowerShell's Information stream. The 6>&1 redirection displays that output in the console — without it you won't see the detailed progress messages during execution.

3

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.

Signing out afterwards: the Azure sign-in stays active after the command has finished. Once you are done, run Disconnect-AzAccount to sign out of the existing session.

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:

Feature
Permission

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, -AddFeatures or -RemoveFeatures, the features already configured in the tenant are kept and the default features are added. Nothing is removed.

  • -Features replaces the configuration: configured features that are not in the list are removed, including their service principal. An empty list is rejected.

  • -AddFeatures and -RemoveFeatures change 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:

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.

Feature
Description
Default

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

☑️

SecurityFeatures

Defender for Endpoint integration on device pages (requires MDE licenses)

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.

Advanced setup card on the Organization Features page
Advanced setup card for tenants on Quick 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?