Skip to main content

Microsoft and Google Sign-In

Overview​

People can sign in with Sign in with Microsoft (Microsoft Entra ID, formerly Azure AD) or Sign in with Google instead of a password. DataDios checks the token the provider sends, finds or creates the person's account, and then gives them a normal DataDios session, the same as a password sign-in.

Settings​

Server settings. Set these on the DataDios server. Without the setting for a provider, every sign-in with that provider is refused.

SettingWhat to enter
AZURE_CLIENT_AUDIENCEThe Application (client) ID of the Microsoft app registration DataDios signs in with. Required for Microsoft sign-in.
GOOGLE_CLIENT_IDThe Google OAuth client ID. Required for Google sign-in.
GOOGLE_CLIENT_SECRETThe secret of that Google OAuth client. Required for Google sign-in.
GOOGLE_CLIENT_AUDIENCEOptional. The client ID Google tokens must be for. If it is not set, GOOGLE_CLIENT_ID is used.

Web app settings. Set these when you build the DataDios web app. Without them, the sign-in page shows no Sign in with Microsoft or Sign in with Google button. If the web app is served under a path such as /v2/, the Google button also needs VITE_GOOGLE_REDIRECT_URI.

SettingWhat to enter
VITE_AZURE_CLIENT_IDThe same Application (client) ID as AZURE_CLIENT_AUDIENCE.
VITE_AZURE_TENANT_IDOptional. A directory ID to allow only that directory. If it is not set, common is used, so any Microsoft account can sign in; personal accounts get their own private tenant (see below).
VITE_GOOGLE_CLIENT_IDThe same Google OAuth client ID as GOOGLE_CLIENT_ID.
VITE_GOOGLE_REDIRECT_URIRequired when the web app is served under a path such as /v2/: the Google redirect URI to use. If it is not set, the web address plus /home is used.

Register the DataDios web address as a redirect URI, including its path if the web app is served under one (for example https://host/v2/): on the Microsoft app registration as a single-page application, and on the Google OAuth client with /home added to the end.

DataDios also checks that the token comes from the provider itself, and for Google that the email address is verified.

Who signs in to which tenant​

A person's account is found by the provider's own id for them, not by their email address. So a changed email keeps the same account, and someone else with the same email never gets it. An account made before this check is matched by email once, and from then on by that id.

The first time someone signs in, DataDios picks their tenant from their company: the Microsoft directory they belong to, or their Google Workspace domain.

The person signs in withWhere they land
A company account, and the company's directory or domain is linked to a tenantThey join that tenant as a Normal user. With Microsoft, the app role Admin in their directory makes them an Admin instead.
A company account, and the company's directory or domain is not linked to any tenantA new tenant is made for the company, and this first person is its Admin. Colleagues who sign in later join it as Normal users. If people from the company already sign in with Microsoft or Google, the sign-in is refused until support links the company to a tenant.
A personal Microsoft account or a Gmail addressTheir own private tenant, where they are the Admin.

A company's directory or domain is linked to a tenant in these ways. When you upgrade, each Microsoft directory and Google Workspace domain whose users are all in one tenant is linked to that tenant. Otherwise, the first person from the company to sign in links it to the new tenant made for them. Later, if a company that is not linked has all its users in one tenant, the next sign-in by one of them links it to that tenant. A tenant whose people all sign in with a password is not linked to anything. Personal Microsoft accounts and Gmail addresses are never linked.

warning

If your company already uses DataDios with passwords, contact support to link your company's directory or domain to your tenant before people start signing in with Microsoft or Google. Otherwise the first person to sign in gets a new, empty tenant, and colleagues who sign in after them join it.

When someone joins a tenant that already exists, they start as Admin only when their Microsoft directory gives them the app role Admin. Being the first to sign in does not make anyone an admin there, and Google accounts that join an existing tenant start as Normal users. The only other people who start as Admin are the first person from a new company and people with a personal account, because each is the Admin of the new tenant made for them. After that, an admin can make anyone an Admin in DataDios. To give someone more access, use Roles, Groups and Permissions.

DataDios reads the app role only when the account is first created, and only the first role in the token counts. Later app-role changes in Microsoft do not change an existing account. If your tenant has Group mappings rules, a person's role is instead set from their Microsoft groups at every sign-in. To make someone an Admin this way, assign the role before their first sign-in: in the Microsoft Entra admin center, open Enterprise applications, then the DataDios app, then Users and groups, add the person and pick the Admin role.

Why a sign-in is refused​

MessageWhat it means
Ask your administrator to add you.The company's tenant is set so that new people can't join on their own. Contact support to change it.
Your organization is not set up for sign-in yet, contact adminThe company's Microsoft directory or Google domain already has users but isn't linked to a tenant, for example because they are in more than one tenant, so DataDios can't tell which one to use. Contact support to link it to one tenant.
This email already has an account in your organization, contact adminThe company's tenant already has an account with this email, for example a password account. That person keeps signing in with it, or an admin deletes it so the sign-in can make a new one. Deleting an account also deletes the person's own work: their schema, search indexes and files. DataDios can't move that work to another account, so ask the person what they want to keep before you delete it.
More than one account matches this sign-in, contact adminTwo older accounts match the same person. An admin has to remove one.
User account is not activeThe account is deactivated.

Two-step sign-in​

People who sign in with Microsoft or Google are not asked to set up a DataDios second factor, and the roles that require one do not apply to them. Their provider's own sign-in rules, such as Microsoft multi-factor authentication, apply instead. The one exception: if the account itself already has a DataDios second factor, sign-in is refused with a message to contact your administrator, because Microsoft or Google sign-in can't complete that step. See Two-Step Authentication.

Calling the API with a provider token​

After signing in, the browser uses the DataDios session. For now, the server still accepts a person's Microsoft or Google token sent directly on an API call. This will be turned off in a later release by setting SSO_BEARER_FOR_PEOPLE=false on the server. After that, scripts must sign in or use an API key. Service accounts that sign in with an Azure app are not affected.