What you’ll need
- An Azure account and a tenant (or create a tenant).
- Your ngrok authtoken and an endpoint with the OAuth action in its Traffic Policy.
Register an application
- Sign in to the Azure portal and select or create a tenant for your application.
- Search for Microsoft Entra ID and select it.
- In the left-hand navigation, select App registrations.
- Select New registration at the top.
- Enter a name for your application.
- ngrok does not support single-tenant applications.
Choose one of these supported account types:
- Accounts in any organizational directory (Any Microsoft Entra directory - Multitenant)
- Accounts in any organizational directory and personal Microsoft accounts (for example, Skype, Xbox)
- Under redirect URI, choose Web and enter
https://idp.ngrok.com/oauth2/callback. - Click Register.
Configure your application
- With your application open, select Overview in the left-hand navigation.
- In the top information section, note the Application (client) ID for later.
- Select API permissions in the left-hand navigation.
- Add any additional scopes your application requires and note them for later.
- Scopes that require application review by Microsoft are unsupported.
- Scopes that require admin consent prevent tenants’ users from authorizing until consent is granted.
- Ensure
User.Reador a more permissive scope (for example,User.Read.All) is configured for ngrok. - Select Certificates & secrets in the left-hand navigation.
- Select New client secret at the bottom, name the secret, set an expiration, and click Add.
- Creation is asynchronous. When the secret appears, copy the Value and store it securely (the value is shown only once).
Update your ngrok endpoint Traffic Policy
- Access the ngrok Dashboard Endpoints page and locate an existing endpoint you’d like to add this to or create a new one.
- In your traffic policy, add the following configuration:
You may add any scopes that are required by your application with the following caveats.
- Scopes which require a Facebook app review are unsupported.
- ngrok will enforce that users accept all permissions before completing authorization.
Configure access control
Optionally, configure access control to your service by only allowing specific users or domains.- By Email
- By Name
Further resources
- Creating a Microsoft Entra ID tenant
- Permissions and consent (restricted permissions)
- Microsoft Graph User resource type (id, displayName, mail, userPrincipalName)