You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pick the option below that matches the level of access available in the target tenant.
448
448
@@ -468,7 +468,7 @@ Send a user from the target tenant to the SPA URL. Auth Code + PKCE hits `https:
468
468
469
469
#### Option C — Pre-provision via Microsoft Graph
470
470
471
-
Run from a session signed in as a Global Administrator of the target tenant:
471
+
Run from a session signed in as a Global Administrator of the target tenant. The Microsoft Graph PowerShell module needs to be installed first if it isn't already (`Install-Module Microsoft.Graph.Authentication, Microsoft.Graph.Applications -Scope CurrentUser`):
The service principal then appears under *Enterprise applications* in the target tenant. Tenant-wide consent can be granted from *Permissions → Grant admin consent*.
479
479
480
+
#### Option D — Pre-provision via Azure CLI (no extra modules)
481
+
482
+
If the Microsoft Graph PowerShell module is not installed, use `az` instead — it ships with the standard Azure CLI:
483
+
484
+
```powershell
485
+
# 1. Confirm the registration is actually multi-tenant (run in the home tenant).
486
+
az login --tenant aa93b9d9-037d-4f08-a26d-783cff0e2369 --allow-no-subscriptions
487
+
az ad app show --id 0713f130-110b-4982-9ce3-8c9227935ca0 `
# 3. If the previous command returned nothing, install the service principal.
498
+
az ad sp create --id 0713f130-110b-4982-9ce3-8c9227935ca0
499
+
```
500
+
501
+
Common gotcha: signing in to the wrong tenant in step 1 returns `Resource '...' does not exist` from `az ad app show`. The home tenant for this registration is `aa93b9d9-037d-4f08-a26d-783cff0e2369`; do not confuse it with the workshop sandbox tenant `cddc1229-...`.
502
+
503
+
If `az ad sp create` fails with *"does not reference a valid application object"* even though `signInAudience` is `AzureADMultipleOrgs`, the *Allow only certain tenants (Preview)* gate on the registration is blocking provisioning. Workaround: in the home tenant portal, flip the registration to *Allow all tenants* temporarily, run `az ad sp create` from the target tenant, then flip the gate back to *Allow only certain tenants* with the target tenant listed — the service principal persists.
504
+
480
505
### After consent
481
506
482
507
Once the service principal exists in the foreign tenant, an admin in that tenant still needs to:
0 commit comments