Azure Cloud Shell without terminal trouble
Run Azure CLI and the SBS installation scripts directly in your browser, without a local installation and with clear checks for tenant, subscription and permissions.
The easiest route: Cloud Shell in the Azure portal
Azure Cloud Shell is a terminal that runs directly in your browser. You are already signed in with your Azure account and Azure CLI (az) is preinstalled. For the Smarter Visitor Registration installation, we recommend Bash in Cloud Shell.
This page guides you through the two one-time Microsoft Entra steps: prepare-app-registration before the Marketplace deployment and grant-graph-permissions afterwards. See the installation guide for the complete sequence.
Before installing Visitor Registration
Start with the subscription, company-specific naming, quota and resource-provider preflight, including Microsoft.OperationalInsights and separate Bash check/register blocks. Review what the scripts change and when to redeploy or change region.
Open Cloud Shell
- Open portal.azure.com and switch to the customer tenant.
- In the black portal bar, select the Cloud Shell terminal icon. Alternatively, open shell.azure.com.
- Select Bash. The commands on this page are written for Bash.
- On first use, Azure may ask for a subscription and storage for your Cloud Shell files. Follow the wizard and wait for the prompt ending in
$.
No local installation required
In Cloud Shell, you do not need to install Azure CLI or normally run az login. Your portal account is used automatically.
| Choice | Recommendation |
|---|---|
| Bash | Recommended for the commands and .sh scripts in this guide. |
| PowerShell | Also supported; use the supplied .ps1 scripts and the PowerShell examples below. |
| Local terminal | Use only if Azure CLI is already installed and you are familiar with tenant switching, file paths and shell permissions. |
Verify the tenant and subscription
Before every script, check which tenant and subscription Azure CLI is using. A subscription visible in the portal is not necessarily the active CLI subscription.
az account show \
--query "{subscription:name, subscriptionId:id, tenant:tenantId, user:user.name}" \
-o tableaz account list \
--query "[].{Name:name, Id:id, Tenant:tenantId, Default:isDefault}" \
-o table
az account set --subscription "<subscription name or subscription ID>"
az account show \
--query "{subscription:name, tenant:tenantId, user:user.name}" \
-o tableContinue only when the context is correct
The tenant, subscription and user must belong to the customer or planned installation. Otherwise switch the portal directory or sign in explicitly with az login --tenant <tenant ID>, then select the subscription again.
az ad signed-in-user show --query id -o tsvThis command returns the object ID of the signed-in user. Use it as the initial administrator only if that exact account will perform the initial setup. For another person, copy their object ID from the user profile in the Entra admin center.
Download the SBS scripts
Paste the complete block into Bash. It downloads both scripts to the current Cloud Shell directory and makes them executable.
curl -fsSL \
https://www.smarterbusiness.at/downloads/smarter-visitor-registration/prepare-app-registration.sh \
-o prepare-app-registration.sh
curl -fsSL \
https://www.smarterbusiness.at/downloads/smarter-visitor-registration/grant-graph-permissions.sh \
-o grant-graph-permissions.sh
chmod +x prepare-app-registration.sh grant-graph-permissions.sh
ls -l prepare-app-registration.sh grant-graph-permissions.shWhere are my files?
Use pwd to show the current directory and ls -la to list its contents. If your Cloud Shell uses persistent storage, files in your home directory remain available in later sessions.
Before deployment: app registration
First choose the final web app name and deployment prefix on the Marketplace Basics step. Then run the preparation script with exactly the same values. You need at least Application Administrator or Cloud Application Administrator in the target tenant.
./prepare-app-registration.sh \
contoso-visitor-registration \
visitorregCopy the client ID
The script finishes with App registration ready and prints the Client ID. Copy that ID to the Marketplace Identity and security step. Running the script again with the same values safely updates the existing registration.
After deployment: Graph permissions
When the Marketplace deployment has completed successfully, run the second script. This requires Privileged Role Administrator or Global Administrator.
./grant-graph-permissions.sh \
"rg-visitor-registration" \
"visitorreg" \
"11111111-2222-3333-4444-555555555555"Expected result
The script reports assigned or already assigned for Group.Read.All and User.Read.All, followed by admin consent granted or updated. The permissions can take a few minutes to become effective.
Replace placeholders correctly
| Placeholder | Meaning and example |
|---|---|
<subscription name or subscription ID> | The target from az account list. Do not copy the angle brackets. |
<web-app-name> | The globally unique name from Basics, for example contoso-visitor-registration. |
<deployment-prefix> | The Marketplace deployment prefix, for example visitorreg. |
<resource-group> | The Marketplace deployment resource group, for example rg-visitor-registration. |
<client-id> | The client ID printed by prepare-app-registration. |
<tenant-id> | The tenant ID from az account show; only needed for an explicit tenant switch. |
Angle brackets are not command characters
Always replace the whole placeholder including < and >. For example, az account set --subscription "<subscription ID>" becomes az account set --subscription "12345678-…".
PowerShell alternative
If you prefer PowerShell in Cloud Shell, switch to PowerShell using the shell selector and download the .ps1 variants. Do not mix Bash and PowerShell syntax in the same input.
Invoke-WebRequest -Uri "https://www.smarterbusiness.at/downloads/smarter-visitor-registration/prepare-app-registration.ps1" -OutFile "prepare-app-registration.ps1"
Invoke-WebRequest -Uri "https://www.smarterbusiness.at/downloads/smarter-visitor-registration/grant-graph-permissions.ps1" -OutFile "grant-graph-permissions.ps1"
./prepare-app-registration.ps1 -WebAppName "contoso-visitor-registration" -DeploymentName "visitorreg"
./grant-graph-permissions.ps1 -ResourceGroup "rg-visitor-registration" -DeploymentName "visitorreg" -ClientId "11111111-2222-3333-4444-555555555555"Common errors
“az: command not found”
az is already installed there.“The subscription … does not exist” or the subscription is missing
az account list -o table first. If the subscription is missing, you are usually in the wrong tenant or the permission was granted only recently. Switch the portal directory or restart Cloud Shell.“Permission denied” when starting a .sh script
chmod +x prepare-app-registration.sh grant-graph-permissions.sh, then start the script with ./.“No such file or directory”
pwd and ls -la to check the current directory. If necessary, download the script again with the download block.“Authorization_RequestDenied” or “Insufficient privileges”
Cloud Shell ended because of inactivity
The script prints a client ID, but Marketplace rejects it
Work safely and get help
- Never send session secrets, passwords, access tokens or the output of
az account get-access-tokenby email or chat. - Client IDs and tenant IDs are not passwords. Still redact usernames, subscription IDs and unrelated tenant data in screenshots.
- Generate the session secret, for example with
openssl rand -hex 32, and enter it only in the protected Marketplace fields. - When asking for help, send the command without secrets, the exact error message and the step at which it occurred.
Questions about this product?
Our support team is happy to help with any questions about Smarter Visitor Registration.