Entra ID
Configure SURF to authenticate and authorise users against Microsoft Entra ID (formerly Azure AD). This page covers user sign-in via SAML or OIDC, user and group synchronisation, admin console SSO, and conditional access.
Before you start
| Requirement | Detail |
|---|---|
| Entra ID access | Administrator on portal.azure.com with rights to create enterprise applications and app registrations |
| SURF access | Administrator on the SURF Admin console |
| Decision needed | Whether users will authenticate via SAML or OIDC. Configure one, not both. |
| Optional | Graph API permissions, if you want to sync users and groups from Entra ID into SURF |
Both SAML and OIDC are supported and either is sufficient for user sign-in. SAML is configured through an Entra ID enterprise application; OIDC is configured through an app registration. Group sync and admin SSO both build on the application object you create here, so keep its name to hand.
Step 1: Add the Azure integration in SURF
- Navigate to SURF Admin portal β Settings β Integrations.
- Find Azure and select Add integration.
- In the Domain field, enter
login.microsoftonline.com - Click Submit.
The Azure integration now appears in the integrations list. Every later step returns to this row and uses the gear icon beside it.
Step 2: Configure user authentication
Complete either Option A or Option B, not both.
Option A: SAML authentication
In SURF Admin
- Go to Settings β Integrations, click the gear beside the Azure integration and select Update integration.
- Select SAML.
- Open the SAML dropdown and download the SURF metadata. Keep the file, you will upload it to Entra ID.
In Entra ID
- Sign in to
portal.azure.comas an administrator. - Go to Enterprise applications β New application β Create your own application.
- Give the application a name and click Create.
- In the left menu select Single sign-on, then choose SAML.
- Select Upload metadata file and upload the SURF metadata.
- Once saved, download the Federation Metadata XML from the SAML signing certificate section.
- Under Users and groups, assign the groups that should be allowed to sign in.
Back in SURF Admin
- Return to the Azure integration and upload the Entra ID Federation Metadata XML.
- Select Submit credentials.
Option B: OIDC authentication
In SURF Admin
- Go to Settings β Integrations, click the gear beside the Azure integration and select Update integration.
- Select OIDC. Leave the dialog open, you will return to it with values from Entra ID.
In Entra ID
- Sign in to
portal.azure.comas an administrator. - Go to App registrations β New registration.
- Enter a name, leave Supported account types as Accounts in this organizational directory only unless your tenant requires otherwise, and click Register.
- On the Overview page, copy the Directory (tenant) ID and the Application (client) ID.
- Go to Certificates & secrets β New client secret. Enter a description, set an expiry, and click Add.
- Copy the secret Value immediately. It is not retrievable once you navigate away. Copy the Value, not the Secret ID.
Back in SURF Admin
- Fill in the integration dialog:
| Field | Value |
|---|---|
| Name | A label of your choice, for example Surf OIDC |
| Client ID | Application (client) ID |
| Client Secret | Secret Value |
| Tenant ID | Directory (tenant) ID |
- Select Submit credentials.
Back in Entra ID
- In the app registration, go to Authentication β Add a platform β Web.
- Set the redirect URI to
https://prod-backend.surf-admin.link/api/v1/admin/auth/azure-oidc - Under Implicit grant and hybrid flows, tick ID tokens.
- Click Configure.
Step 3: Sync users and groups
Imports Entra ID users and groups into SURF so policies can be applied to existing groups. This is a prerequisite for admin SSO.
- Open the app registration with the same name as the application created in Step 2.
- Go to API permissions β Add a permission β Microsoft Graph β Application permissions.
- Add the following:
| Permission | Purpose |
|---|---|
Directory.Read.All | Read directory data |
Group.Read.All | Read all groups |
GroupMember.Read.All | Read all group memberships |
- Grant admin consent for the tenant. Each permission should show Granted in the admin consent column.
- In SURF Admin, go to Users and Groups β Groups β sync options.
- Select Azure and the tenant details configured above.
- Choose the groups to import and confirm.
Step 4: Configure admin console SSO
Lets administrators sign in to the SURF Admin console with their Entra ID credentials. This is configured separately from user authentication and uses a different menu option in SURF.
4.1 Mark the admin group
- In SURF Admin, sync the admin group from Entra ID following Step 3.
- When selecting the group, tick both AUTO SYNC and IS ADMIN.
4.2 Create the enterprise application
- Create an enterprise application configured for SAML authentication following Option A above, but assign the admin group as the group allowed to use the application.
- Do not use the metadata step from that section. Use 4.3 below instead.
4.3 Exchange metadata using Update global SSO
- In SURF Admin, go to Settings β Integrations, click the gear beside the Azure integration and select Update global SSO. This is a different menu item from Update integration and is what makes the configuration apply to the admin console.
- Click Download Metadata.
- In Entra ID, open the enterprise application from 4.2, go to Single sign-on β SAML, select Upload metadata file and upload the SURF metadata.
- Download the Federation Metadata XML from Entra ID.
- Return to the Azure SSO config dialog in SURF Admin and either upload the XML or enter the values manually:
| Field | Where it comes from |
|---|---|
| Entity ID | Microsoft Entra Identifier, for example https://sts.windows.net/<tenant-id>/ |
| Single SignOn URL | Login URL, for example https://login.microsoftonline.com/<tenant-id>/... |
| Public Certificate | Certificate (Base64) from the SAML signing certificate section |
- Set Enable SSO config to ON.
- Click Submit.
4.4 Verify
- Log out of the SURF Admin console.
- Attempt to log in with an Entra ID account belonging to the admin group.
Step 5: Configure conditional access
Restricts a SaaS application so it can only be reached from inside SURF. Traffic for the application is routed through a known proxy address, then Entra ID is told to block sign-ins that do not originate from that address.
The example below is Microsoft 365. The same pattern applies to any SaaS application.
5.1 Configure the proxy in SURF
- In SURF Admin, go to Policy management β Proxy Access Management.
- Configure the proxy:
| Setting | Notes |
|---|---|
| Hosting | SURF's proxy or Self hosted proxy. If SURF hosts it, the SURF support team supplies the address. |
| Type | Server or PAC file |
| Is Global | Global applies the proxy to all traffic; Not Global applies it only to the URLs selected below |
| Mode | Persistent or Temporary |
| Custom Proxy DNS / IP | The proxy address including port, for example 3.123.10.23:3221 |
- Click Set.
- Under Affected SaaS URLs, select the applications to route through the proxy.
- Add anything not in the list under Additional Affected URLs. To cover Entra ID sign-in itself, add
login.microsoftonline.com - Turn the Proxy Access Management toggle ON.
5.2 Create the conditional access policy in Entra ID
- In the Azure portal, go to Conditional Access β Named locations and create a named location for the proxy address from 5.1. Name it recognisably, for example
Surf Proxy. - Go to Conditional Access β Policies β New policy.
- Under Assignments, select the users or groups and the target applications.
- Under Grant, select Block access.
- Under Conditions β Locations, include Any location and exclude the
Surf Proxynamed location. - Set the policy to On and save.
5.3 Verify
- In the SURF browser, refresh policy.
- Open the protected application from SURF. It should load.
- Open the same application from a standard browser. It should be blocked by Entra ID.
Reference
SURF endpoints
| Purpose | Value |
|---|---|
| OIDC redirect URI | https://prod-backend.surf-admin.link/api/v1/admin/auth/azure-oidc |
| Entra ID domain (Step 1) | login.microsoftonline.com |
Menu paths
| Task | Path |
|---|---|
| Add or update the integration | SURF Admin β Settings β Integrations β Azure β gear β Update integration |
| Configure admin console SSO | SURF Admin β Settings β Integrations β Azure β gear β Update global SSO |
| Sync groups | SURF Admin β Users and Groups β Groups β sync options |
| Proxy configuration | SURF Admin β Policy management β Proxy Access Management |
Troubleshooting
| Symptom | Check |
|---|---|
| Users can authenticate but see no groups | Graph API permissions added but admin consent not granted |
| Admin SSO does not apply | Configuration saved under Update integration instead of Update global SSO |
| Admin group members cannot access the admin console | Group synced without IS ADMIN ticked, or the group is not assigned to the enterprise application |
| OIDC sign-in fails with a redirect error | Redirect URI missing or mistyped in the app registration |
| Client secret rejected | Secret ID copied instead of secret Value |
| Conditional access blocks SURF as well as other browsers | login.microsoftonline.com not added to the affected URLs, or the named location does not match the proxy address |
For anything not covered here, contact the SURF support team.
