# How Microsoft sign-in works

Microsoft sign-in uses OpenID Connect. Your organization trusts one Microsoft directory: the directory an administrator connected on the **SSO** page. Teamhood lets a person in with Microsoft only when their work account belongs to that directory.

## What Teamhood asks Microsoft for

- Teamhood asks only for the sign-in permissions `openid`, `profile` and `email`. They tell Teamhood who the person is: their name, email address, Microsoft account and directory.
- Teamhood asks for no access to mail, files or other data in your directory.
- Work and school accounts can sign in. Personal Microsoft accounts cannot.
- Your directory may require an administrator to approve Teamhood. Until an administrator approves it, Microsoft stops your people with its own approval message.

## Who gets in

- An account from another directory is refused, even when its email address matches an account in your organization.
- With **Anyone from the directory**, a person who has no Teamhood account gets one on their first Microsoft sign-in.
- With **Invited people only**, a person needs an account in your organization, or an invite that has not expired.
- On a person's first Microsoft sign-in, the account or invite with the same email address in your organization is linked to their Microsoft account.
- A directory can give a former employee's address to someone new. When Teamhood knows that an account belongs to another Microsoft account of the same directory, it does not link the account by email. That sign-in is refused, and no account is created.
- Teamhood refuses a deactivated account. Deactivate a former employee's account, so that nobody can take it over through their old address.
- A Microsoft administrator can narrow it further by requiring assignment for the Teamhood app in your directory.

## An example

Your organization connected the Contoso directory and chose **Invited people only**. Ana has a Contoso work account, and an invite to your organization at the same email address. Her first Microsoft sign-in links her invite to her Microsoft account, and she gets in.

Ben also has a Contoso work account, but no invite. Teamhood refuses his sign-in and creates no account for him. With **Anyone from the directory**, Ben would get an account instead.

## Signing in without the organization's address

On the [Teamhood sign-in page](https://app.teamhood.com/sign-in), a person signs in with Microsoft first. Teamhood then finds the organizations that connected the person's directory and switched **Microsoft sign-in** on. It keeps only those that would let the person in.

- One organization opens straight away.
- Several show a list to choose from.
- When there is none, the page says so and creates nothing.

## With password sign-in off

- The login page shows only **Sign in with Microsoft**.
- Password resets and emailed sign-in links stop.
- An invited person cannot accept the invite by choosing a password. They sign in with Microsoft instead.
- People who are already signed in stay signed in.
- The organization cannot require Teamhood two-factor authentication while password sign-in is off. Setting up a Teamhood second factor asks for the password, and Microsoft sign-in does not ask for that factor.
- Your directory's own rules decide whether Microsoft asks for a second factor.
- Switching **Microsoft sign-in** off, or disconnecting the directory, turns password sign-in back on.

## With two-factor authentication required

- A person who signs in with Microsoft is not asked for a Teamhood second factor.
- An assistant, personal token or calendar sync set up while signed in with Microsoft does not need one either.
- The same person needs a Teamhood second factor when they sign in with their password instead.
- So does an assistant, personal token or calendar sync they set up while signed in with their password.

## An organization on its own Microsoft app

Some organizations sign in through their own Microsoft app, which Teamhood support set up. The **SSO** page then says so. Contact Teamhood support to change the app.

- The directory, **Microsoft sign-in** and **Who can join** cannot be changed on the **SSO** page.
- **Password sign-in** can still be turned off.

## What the messages mean

- **Could not connect** on the **SSO** page means Teamhood did not store the directory. Causes include cancelling the sign-in at Microsoft, and declining to approve Teamhood there. Another cause is no longer being an administrator in Teamhood.
- **Single sign-on failed** on the login page means Microsoft sign-in did not finish. One cause is an account from a directory that your organization did not connect.
- **Microsoft sign-in is not available for this organization** means Microsoft sign-in is off for the organization.
- **No Teamhood organization you can join lets your Microsoft account sign in** on the Teamhood sign-in page has a few causes. No organization may have connected your directory with **Microsoft sign-in** on. Or the ones that did let in invited people only, and you have no account or unexpired invite there. Or your account there is deactivated.

## Next

- [Set up Microsoft sign-in](../../roles-and-access/set-up-microsoft-sign-in/)
