What does a business system cost? See example prices – CRM, site migration, custom software and consulting.Example prices →
Ambit System Software

Articles · guide

SSO sign-in: Microsoft Entra ID, GitHub and Google

Employees sign in to the application with the account they already use every day: a work Microsoft account, a GitHub account or a Google account (Gmail or Google Workspace). This guide walks an administrator through registering the application with each provider.

As of November 2026. Names in the providers' consoles change from time to time.

Before you start

  • What SSO gives you

    The application stores no employee passwords. Two-step sign-in and access rules are set once, at the provider, and disabling an account in the company also cuts off access to the application.

  • Who sets it up

    The administrator of the company account at the provider: in the Microsoft Entra ID directory, in the GitHub organization or in the Google Cloud project. The application's author needs no access to these accounts.

  • The return address

    After sign-in the provider sends the user back to one address of the application, registered in advance (redirect URI, callback URL). The application's author gives it to you. It must match character for character: https, domain, path, trailing slash.

  • What you end up with

    A client identifier (Client ID) and a client secret (Client Secret), and with Microsoft also the directory identifier (Tenant ID). These values go into the application's configuration.

Microsoft Entra ID

For companies on Microsoft 365. Employees sign in with their work account, and company rules – two-step sign-in, conditional access – apply to this application straight away.

Where
The Microsoft Entra admin center (entra.microsoft.com). You need at least the Application Developer role, and Cloud Application Administrator to grant admin consent.
Example return address
https://app.yourcompany.com/signin-oidc

Step by step

  1. Sign in to entra.microsoft.com and open Entra ID → App registrations → New registration.
  2. Enter the name users will see when signing in – ideally the application's and the company's name.
  3. Under Supported account types choose "Accounts in this organizational directory only" (single tenant). Then only your employees can sign in. Choose multiple directories only when the application serves several companies.
  4. Under Redirect URI choose the Web platform, paste the application's return address and click Register.
  5. On the Overview page copy the Application (client) ID and the Directory (tenant) ID.
  6. Open Certificates & secrets → New client secret. Enter a description, choose how long it is valid and add it. Copy the Value column straight away – after a page refresh it is no longer shown.
  7. Under API permissions keep the default delegated Microsoft Graph permission User.Read. If users in your company cannot consent themselves, click Grant admin consent.
  8. Optionally limit access: in Enterprise applications open this application, set Assignment required to Yes in Properties, and add the people or groups who should sign in under Users and groups.

What to write down

Directory (tenant) ID
the identifier of your directory, a GUID.
Application (client) ID
the identifier of the registered application, also a GUID.
Client secret – Value
the secret's value, shown only once. The Secret ID is not the secret and is of no use here.

Watch out for

  • The secret has an expiry date. Put a reminder in the calendar before it – once it expires nobody can sign in. Add the new secret before removing the old one, so the swap does not interrupt work.
  • The application should recognise a person by the oid and tid identifiers in the token, not by the e-mail address. The e-mail and the name can change, the object identifier cannot.
  • Conditional Access needs an Entra ID P1 licence. Without it, two-step sign-in is switched on by security defaults.

For the developer: OpenID Connect. Issuer: https://login.microsoftonline.com/<tenant-id>/v2.0. Scopes: openid profile email.

GitHub

For development teams and companies that work in a GitHub organization. Sign-in with a GitHub account, and access can be narrowed to members of the organization or a team.

Where
The organization settings on github.com. Register the application in the organization, not on an employee's personal account – otherwise it disappears with that account. You need the organization Owner role.
Example return address
https://app.yourcompany.com/signin-github

Step by step

  1. On github.com open your organization → Settings → Developer settings → OAuth Apps → New OAuth App.
  2. Application name is the name shown on the consent screen. In Homepage URL enter the application's main address.
  3. In Authorization callback URL paste the application's return address. For a test environment create a separate OAuth app with its own address.
  4. Leave Enable Device Flow unticked and click Register application.
  5. Copy the Client ID. Click Generate a new client secret and copy the secret straight away – GitHub shows it only once.
  6. Optionally upload a logo. Users see it on their first sign-in, when GitHub asks for consent.

What to write down

Client ID
the OAuth app's identifier, public.
Client secret
the secret, shown only right after it is generated.

Watch out for

  • Everyone has a GitHub account. To let in only your people, the application checks membership of the organization or a team (the read:org scope). Agree with the application's author which organization and which teams this covers.
  • GitHub issues no identity token. After sign-in the application reads the profile and the e-mail addresses from the GitHub API, because the address in the profile may be hidden (the user:email scope).
  • A person is recognised by the numeric account id, not the login – a GitHub login can be changed.
  • A GitHub secret does not expire on its own. To change it: generate a new one, swap it in the application, and only then delete the old one.

For the developer: OAuth 2.0, without OpenID Connect. Authorization: https://github.com/login/oauth/authorize, token: https://github.com/login/oauth/access_token, profile: https://api.github.com/user. Scopes: read:user user:email, optionally read:org.

Google (Gmail and Google Workspace)

For companies on Google Workspace and for applications that customers sign in to with a personal Gmail account. One setting decides which of these groups can sign in.

Where
Google Cloud Console (console.cloud.google.com), the Google Auth Platform section – formerly the OAuth consent screen. With Google Workspace, create the project in the company's organization, not on a personal account.
Example return address
https://app.yourcompany.com/signin-google

Step by step

  1. In console.cloud.google.com create a project or pick an existing one and open Google Auth Platform.
  2. On the Branding tab enter the application name, the user support e-mail and the developer contact e-mail. Add the application's domain to Authorized domains.
  3. On the Audience tab choose the type: Internal – only accounts of your Google Workspace organization can sign in; External – any Google account, including personal @gmail.com ones. An External app in testing mode lets in only the test users you add, so click Publish app before going live.
  4. On the Data Access tab the basic scopes are enough: openid, userinfo.email and userinfo.profile. They are not sensitive scopes.
  5. On the Clients tab click Create client and choose the Web application type.
  6. Under Authorized redirect URIs add the application's return address. Leave Authorized JavaScript origins empty when sign-in is handled by the application's server.
  7. Click Create, copy the Client ID and the Client secret. Save the secret straight away – Google shows it in full only at creation.

What to write down

Client ID
ends with .apps.googleusercontent.com, public.
Client secret
the secret, shown in full only when the client is created.

Watch out for

  • Without extra checks the External type lets in any Google account. To let in only the company, the application checks the Workspace domain of the account (the hd field in the token) or a list of allowed addresses.
  • A person is recognised by the sub field in the token. The e-mail address is accepted only when email_verified is true.
  • Changes to redirect addresses take effect after a few minutes, sometimes longer. A redirect_uri_mismatch error right after saving usually goes away by itself.

For the developer: OpenID Connect. Issuer: https://accounts.google.com. Scopes: openid email profile.

How to hand the data over and check it works

  • No secrets by e-mail

    The Client ID and the Tenant ID are not secret. Hand the secret over through a password manager with sharing or a one-time link – never in an e-mail, a chat message or a ticket.

  • Test and production apart

    The test environment gets its own registration, its own return address and its own secret. A leak from testing then does not open production.

  • Two accounts to try

    Sign in with an account that should have access and with one that should not. The second must be stopped.

  • A note for your successor

    Write down in the company documentation where the registration is, who created it and when the secret expires.

The most common errors

AADSTS50011, redirect_uri_mismatch, "The redirect_uri is not associated"
The return address differs from the registered one: http instead of https, another domain, a missing or extra trailing slash.
AADSTS7000215, invalid_client
The application got the Secret ID instead of the secret's value, the secret was pasted with a space, or it has expired (Microsoft then reports AADSTS7000222).
Google: Error 403 access_denied
The External app is in testing mode and the user is not on the test user list. Add them or publish the app.
GitHub: no e-mail address
The user hid the address in their profile and the application does not ask for the user:email scope.

← Back to articles

Tell us about your process

We reply within one working day. The first conversation about your process is free, and we prepare every quote individually.

Tell us about your process