Documentation

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

RequirementDetail
Entra ID accessAdministrator on portal.azure.com with rights to create enterprise applications and app registrations
SURF accessAdministrator on the SURF Admin console
Decision neededWhether users will authenticate via SAML or OIDC. Configure one, not both.
OptionalGraph 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

  1. Navigate to SURF Admin portal β†’ Settings β†’ Integrations.
  2. Find Azure and select Add integration.
  3. In the Domain field, enter login.microsoftonline.com
  4. 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

  1. Go to Settings β†’ Integrations, click the gear beside the Azure integration and select Update integration.
  2. Select SAML.
  3. Open the SAML dropdown and download the SURF metadata. Keep the file, you will upload it to Entra ID.

In Entra ID

  1. Sign in to portal.azure.com as an administrator.
  2. Go to Enterprise applications β†’ New application β†’ Create your own application.
  3. Give the application a name and click Create.
  4. In the left menu select Single sign-on, then choose SAML.
  5. Select Upload metadata file and upload the SURF metadata.
  6. Once saved, download the Federation Metadata XML from the SAML signing certificate section.
  7. Under Users and groups, assign the groups that should be allowed to sign in.

Back in SURF Admin

  1. Return to the Azure integration and upload the Entra ID Federation Metadata XML.
  2. Select Submit credentials.

Option B: OIDC authentication

In SURF Admin

  1. Go to Settings β†’ Integrations, click the gear beside the Azure integration and select Update integration.
  2. Select OIDC. Leave the dialog open, you will return to it with values from Entra ID.

In Entra ID

  1. Sign in to portal.azure.com as an administrator.
  2. Go to App registrations β†’ New registration.
  3. Enter a name, leave Supported account types as Accounts in this organizational directory only unless your tenant requires otherwise, and click Register.
  4. On the Overview page, copy the Directory (tenant) ID and the Application (client) ID.
  5. Go to Certificates & secrets β†’ New client secret. Enter a description, set an expiry, and click Add.
  6. Copy the secret Value immediately. It is not retrievable once you navigate away. Copy the Value, not the Secret ID.

Back in SURF Admin

  1. Fill in the integration dialog:
FieldValue
NameA label of your choice, for example Surf OIDC
Client IDApplication (client) ID
Client SecretSecret Value
Tenant IDDirectory (tenant) ID
  1. Select Submit credentials.

Back in Entra ID

  1. In the app registration, go to Authentication β†’ Add a platform β†’ Web.
  2. Set the redirect URI to https://prod-backend.surf-admin.link/api/v1/admin/auth/azure-oidc
  3. Under Implicit grant and hybrid flows, tick ID tokens.
  4. 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.

  1. Open the app registration with the same name as the application created in Step 2.
  2. Go to API permissions β†’ Add a permission β†’ Microsoft Graph β†’ Application permissions.
  3. Add the following:
PermissionPurpose
Directory.Read.AllRead directory data
Group.Read.AllRead all groups
GroupMember.Read.AllRead all group memberships
  1. Grant admin consent for the tenant. Each permission should show Granted in the admin consent column.
  2. In SURF Admin, go to Users and Groups β†’ Groups β†’ sync options.
  3. Select Azure and the tenant details configured above.
  4. 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

  1. In SURF Admin, sync the admin group from Entra ID following Step 3.
  2. When selecting the group, tick both AUTO SYNC and IS ADMIN.

4.2 Create the enterprise application

  1. 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.
  2. Do not use the metadata step from that section. Use 4.3 below instead.

4.3 Exchange metadata using Update global SSO

  1. 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.
  2. Click Download Metadata.
  3. 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.
  4. Download the Federation Metadata XML from Entra ID.
  5. Return to the Azure SSO config dialog in SURF Admin and either upload the XML or enter the values manually:
FieldWhere it comes from
Entity IDMicrosoft Entra Identifier, for example https://sts.windows.net/<tenant-id>/
Single SignOn URLLogin URL, for example https://login.microsoftonline.com/<tenant-id>/...
Public CertificateCertificate (Base64) from the SAML signing certificate section
  1. Set Enable SSO config to ON.
  2. Click Submit.

4.4 Verify

  1. Log out of the SURF Admin console.
  2. 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

  1. In SURF Admin, go to Policy management β†’ Proxy Access Management.
  2. Configure the proxy:
SettingNotes
HostingSURF's proxy or Self hosted proxy. If SURF hosts it, the SURF support team supplies the address.
TypeServer or PAC file
Is GlobalGlobal applies the proxy to all traffic; Not Global applies it only to the URLs selected below
ModePersistent or Temporary
Custom Proxy DNS / IPThe proxy address including port, for example 3.123.10.23:3221
  1. Click Set.
  2. Under Affected SaaS URLs, select the applications to route through the proxy.
  3. Add anything not in the list under Additional Affected URLs. To cover Entra ID sign-in itself, add login.microsoftonline.com
  4. Turn the Proxy Access Management toggle ON.

5.2 Create the conditional access policy in Entra ID

  1. 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.
  2. Go to Conditional Access β†’ Policies β†’ New policy.
  3. Under Assignments, select the users or groups and the target applications.
  4. Under Grant, select Block access.
  5. Under Conditions β†’ Locations, include Any location and exclude the Surf Proxy named location.
  6. Set the policy to On and save.

5.3 Verify

  1. In the SURF browser, refresh policy.
  2. Open the protected application from SURF. It should load.
  3. Open the same application from a standard browser. It should be blocked by Entra ID.

Reference

SURF endpoints

PurposeValue
OIDC redirect URIhttps://prod-backend.surf-admin.link/api/v1/admin/auth/azure-oidc
Entra ID domain (Step 1)login.microsoftonline.com

Menu paths

TaskPath
Add or update the integrationSURF Admin β†’ Settings β†’ Integrations β†’ Azure β†’ gear β†’ Update integration
Configure admin console SSOSURF Admin β†’ Settings β†’ Integrations β†’ Azure β†’ gear β†’ Update global SSO
Sync groupsSURF Admin β†’ Users and Groups β†’ Groups β†’ sync options
Proxy configurationSURF Admin β†’ Policy management β†’ Proxy Access Management

Troubleshooting

SymptomCheck
Users can authenticate but see no groupsGraph API permissions added but admin consent not granted
Admin SSO does not applyConfiguration saved under Update integration instead of Update global SSO
Admin group members cannot access the admin consoleGroup synced without IS ADMIN ticked, or the group is not assigned to the enterprise application
OIDC sign-in fails with a redirect errorRedirect URI missing or mistyped in the app registration
Client secret rejectedSecret ID copied instead of secret Value
Conditional access blocks SURF as well as other browserslogin.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.