Switching to the RealmJoin managed app
Replace the per-tenant RealmJoin Runbook Management app registration and its client secret with the RealmJoin managed multi-tenant app, using the RealmJoin PowerShell module.
Overview
Tenants that connected Azure Automation before the PowerShell-based onboarding use a RealmJoin Runbook Management app registration in their own tenant. RealmJoin authenticates against your Automation Account with that app's client ID and client secret.
Newly onboarded tenants no longer do this: RealmJoin uses its own multi-tenant application, which is granted Contributor on your Automation Account and nothing else. You can switch an existing configuration over with the RealmJoin PowerShell module.
Why switch
No client secret to rotate. The per-tenant secret expires and has to be renewed; when it does expire, runbook sync and runbook execution stop until someone notices. The managed app has no secret on your side.
No app registration to maintain in your tenant.
Narrower scope. The legacy service principal was typically given Contributor on the whole resource group. The managed app is granted Contributor on the Automation Account only.
Your Automation Account, its managed identity, its permissions and your runbooks all stay exactly as they are.
What the switch changes
The same Set-RJAutomationAccount command as for a new setup is used, pointed at your existing Automation Account. It:
creates the RealmJoin Azure Resources service principal in your tenant, if it does not exist yet
grants it Contributor on that Automation Account
re-asserts the managed identity's application permissions — Microsoft Graph, Exchange Online, Defender and SharePoint — for the set the module bundles
tells RealmJoin to authenticate with the managed app from now on
Your Automation Account keeps its name, its managed identity and its object ID, so the Entra ID roles and any permissions you assigned to it stay valid. Runbooks are not re-imported from scratch.
Prerequisites
The same as for a new setup — see Prerequisites on the onboarding page. In short:
Access to the Settings area in the RealmJoin Portal, to get the command and its token
PowerShell 5.1 or later, in a freshly opened local session — not Azure Cloud Shell
An account that can create service principals and grant application permissions in Entra ID (Global Administrator or Privileged Role Administrator) and that can create role assignments in the subscription (Owner, or Contributor plus User Access Administrator)
Migration
Copy the command from the RealmJoin Portal
In the RealmJoin Portal, go to Settings → Runbooks (https://portal.realmjoin.com/settings/runbooks-configuration).
The page shows the notice "Switch to the RealmJoin managed app" together with a ready-to-copy command block. Use the Copy button to copy it.
The command is pre-filled with your current resource group, Automation Account name and subscription:
Run the command
Paste the block into a new PowerShell session and run it. The token is valid for roughly an hour — if it has expired, reload the settings page and copy the command again.
You will be prompted to sign in with Connect-AzAccount. The deployment then reports every resource and role assignment as it is applied; anything that already exists is detected and skipped.
Verify in the Portal
Return to Settings → Runbooks and select Refresh.
The migration notice is gone, and the page now shows Runbook sync settings with the branch and the Hybrid Runbook Worker options, plus a read-only Azure connection section. Client ID and client secret are no longer part of the configuration.
Check that the branch is the one you want, then run a runbook to confirm that execution still works.
Troubleshooting
Last updated
Was this helpful?