This guide shows how to let users sign in to GlobalForms with their Microsoft work or school account through Microsoft Entra ID (formerly Azure Active Directory), using OpenID Connect (OIDC).
This feature requires GlobalForms version 10.17.1 or greater.
Before you begin
You will need:
-
An account that can register applications in the Microsoft Entra admin center (for example, the Application Administrator role).
-
The public HTTPS address of your GlobalForms server, for example
https://forms.example.com. See Configuring HTTPS. -
Access to
config\local.jsonon the GlobalForms server, and permission to restart the GlobalForms service. -
A GlobalForms user resource whose records contain each user's Microsoft sign-in email address. Entra ID can only sign in people who already have a matching GlobalForms user record.
Part 1: Register GlobalForms in Microsoft Entra ID
1. Create the app registration
-
Sign in to the Microsoft Entra admin center.
-
Go to Identity → Applications → App registrations and select New registration.
-
Enter a Name, such as
GlobalForms. -
Under Supported account types, choose Accounts in this organizational directory only (Single tenant).
-
Under Redirect URI, select the Web platform and enter your GlobalForms callback address:
https://forms.example.com/oidc/callback -
Select Register.
The redirect URI must exactly match redirectUrl in the GlobalForms configuration (Part 2), including https, host name, port and path.
2. Record the IDs
On the app's Overview page, copy:
-
Application (client) ID: this is your
clientId. -
Directory (tenant) ID: this goes in your issuer URL.
3. Create a client secret
-
Open Certificates & secrets → Client secrets and select New client secret.
-
Enter a description and choose an expiration period, then select Add.
-
Copy the secret's Value right away. Entra ID shows it only once. Do not copy the Secret ID, which is a different value.
Client secrets expire. When a secret expires, single sign-on stops working. Note the expiration date and create a new secret before then (see Renewing the client secret).
4. Check API permissions
-
Open API permissions.
-
Make sure these Microsoft Graph delegated permissions are listed:
openid,emailandprofile. Add any that are missing with Add a permission → Microsoft Graph → Delegated permissions. -
If your organization doesn't let users consent to apps themselves, select Grant admin consent.
5. Add the email claim
Entra ID includes the user's email address in the sign-in token only when you ask for it:
-
Open Token configuration and select Add optional claim.
-
Choose token type ID, select email, then select Add.
-
If prompted, allow the Microsoft Graph email permission to be added.
6. Limit who can sign in (recommended)
By default, every user in your directory can sign in to the app. To allow only selected users or groups:
-
Go to Identity → Applications → Enterprise applications and open the GlobalForms app.
-
Under Properties, set Assignment required? to Yes and save.
-
Under Users and groups, add the users or groups that should have access.
Part 2: Configure GlobalForms
-
Open
config\local.jsonin the GlobalForms install folder (C:\GlobalFormsby default). -
Add or update the
oidcsection, replacing the placeholders with your values:JSON"oidc": { "issuer": "https://login.microsoftonline.com/<Directory (tenant) ID>/v2.0", "clientId": "<Application (client) ID>", "clientSecret": "<Client secret value>", "redirectUrl": "https://forms.example.com/oidc/callback" } -
Save the file and restart the GlobalForms service.
|
Setting |
What to enter |
|---|---|
|
|
|
|
|
The Application (client) ID |
|
|
The client secret Value |
|
|
The exact redirect URI you registered in Part 1 |
|
|
Optional. Leave as |
|
|
Optional. |
For all oidc settings, see Single Sign-On with OpenID Connect.
Part 3: Add the sign-in button to the sign-in page
Add a button labeled Sign in with Microsoft to the User Login form (path user/login), which is the form on the GlobalForms sign-in page. In short:
-
Button Action: Submit, with Button Custom Logic
data.name="oidc"; data.password="oidc"; data.oidc=true -
Button Property Name (API tab):
oidc -
OIDC Login action: your user resource, triggered only if the button Equals
true -
Existing Login action: triggered only if the button Not Equal
true
For the full steps, see Step 3 in Single Sign-On with OpenID Connect.
Part 4: Make sure users can be matched
After Entra ID confirms who the user is, GlobalForms looks in the selected user resources for a record whose usernameField (default email) matches the user's email from Entra ID. Upper and lower case are ignored.
-
The email Entra ID sends comes from the user's Email (mail) property. Check that it is filled in for each user.
-
If a user has no email, GlobalForms uses their Microsoft sign-in name (user principal name, such as
jsmith@example.com) instead. -
If your users' sign-in names and email addresses differ, and your GlobalForms records store sign-in names, set
"claimField": "preferred_username"so GlobalForms always matches on the sign-in name.
Single sign-on does not create GlobalForms accounts. Create or update the user records before asking people to sign in. If you use Active Directory Synchronization or S9IM Synchronization, make sure the synchronized records include the email address.
Part 5: Test the sign-in
-
Open the GlobalForms sign-in page in a private browser window.
-
Select Sign in with Microsoft.
-
Sign in with a Microsoft account that has a matching GlobalForms user record. The first time, you may be asked to accept the app's permissions.
-
Confirm you return to GlobalForms signed in as that user, and that name-and-password sign-in still works.
Renewing the client secret
-
Before the current secret expires, open the app registration's Certificates & secrets and create a new client secret.
-
Replace
clientSecretinconfig\local.jsonwith the new value and restart the GlobalForms service. -
Test sign-in, then delete the old secret in Entra ID.
Troubleshooting
Microsoft error messages start with a code such as AADSTS50011.
|
Message or symptom |
Cause and fix |
|---|---|
|
|
The Web redirect URI in the app registration doesn't exactly match |
|
|
|
|
|
The tenant ID in |
|
|
Assignment is required and the user isn't assigned. Add the user or one of their groups under Users and groups. |
|
|
Users can't consent to the app themselves. Select Grant admin consent under API permissions. |
|
|
No GlobalForms user record matches the value shown. Check the user's email in Entra ID and in GlobalForms, or see Part 4. |
|
Sign-in worked before and suddenly fails for everyone |
The client secret has probably expired. See Renewing the client secret. |
For messages shown by GlobalForms, see the troubleshooting table in Single Sign-On with OpenID Connect.
Security notes
-
Never run production workloads in GlobalForms without HTTPS. Sign-in tokens and user data travel between the browser and the server and can be intercepted without it. Entra ID accepts plain
httpredirect URIs only forlocalhost. -
Treat the client secret like a password. Don't email it or store it in shared documents.
-
Turn on Assignment required so only the people who need GlobalForms can sign in.
-
Conditional Access and multi-factor authentication policies in Entra ID apply to GlobalForms sign-in like any other app.