# Two Factor Authentication

With release 3.7.0, TeamCal Neo introduces the feature of a two factor authentication. It can either be set as mandatory or left optional.

When left optional, users can set up 2FA via the 2FA tab of their profile.

In order to make 2FA mandatory, navigate to the Login tab of the framework configuration and check the `Force Two Factor Authentication` checkbox.

<figure><img src="https://3965970693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNfJcWXKLPxRBe0ACiKo%2Fuploads%2F1ihuZCbHHx4mjpexDBnQ%2F2fa-mandatory.png?alt=media&#x26;token=6271ffd9-290d-4962-909f-6b3e8c194a9e" alt=""><figcaption></figcaption></figure>

If this setting is on, users will be automatically redirected to the [Setup 2FA page](https://lewe.gitbook.io/teamcal-neo/user-guide/two-factor-authentication) the next time they login. The page will provide a barcode and secret code for the onboarding process with an authenticator app. While the secret code is always displayed, the barcode display requires and Internet connection for TeamCal Neo.

{% hint style="warning" %}
Note, that in order to make the TOTP based 2FA work, the server on which TeamCal Neo is hosted needs to be NTP synced. If that is not the case, it might lead to constant code mismatches.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lewe.gitbook.io/teamcal-neo/administration/two-factor-authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
