Users
User, roles and the authentication system in Kimai
A user can be part of a team, which can limit/extend the visibility of data. Access to certain features within Kimai are handled by the permission system, which is configurable through user roles.
Create users
Avatars
There are two types of user avatars:
Auto generated avatar- a circle with colored background and username initials insideImage URL- a user can configure an avatar URL in their profile (feature needs to be activated in System → Settings)
Deactivated users
If you uncheck the Active checkbox when editing the user profile and save:
- the user will be hidden from the user listing ⇒ but you can display them again by using the search and selecting
Bothornofrom theActivedropdown - the user won’t be displayed in most dropdowns and reports
- the user cannot log in to Kimai
A user can be re-activated at any time. The logged-in user cannot deactivate his own profile.
If you want to see all deactivated accounts, switch to the user listing (at System > Users) and choose Active = No in the filter dropdown.
Offboarding users
Deactivation is the recommended way to handle employees who leave your company: it keeps all recorded times available for reports and exports. See Offboarding users for the complete procedure and its consequences.
System accounts
System accounts are users in Kimai, which are hidden in many places. They cannot be chosen from dropdowns, will be hidden in reports and more.
This setting is primarily meant to identify:
- your Admin accounts (which should not be used for daily work)
- API sync accounts
If you edit the users profile, there is a checkbox that says System-Account (Will be hidden in reports and dropdowns).
Toggle it to either hide (active) or show (inactive) the user.
Username / User-ID
The username is a system-wide unique identifier which can be used for logging into the system and it will be included in exports.
It shouldn’t be changed without strong reasoning, but if you want to e.g. activate LDAP or SAML and see that you have to, then a System-Administrator can do so by editing the user profile (editing your own username is not possible).
The field is hidden by default, you have to double-click the username in the header to show it.
Be aware: you cannot change the username of your own account, it is technically impossible and you need a second account for that.
Supervisor
The supervisor setting is used notifications, e.g. work-contract related features, approval workflows and such.
Any user role can be configured as supervisor, while normally it is advised that this is at least a Teamlead.
It is not possible for a System account (see above) to become supervisor.
Staff number
The staff/account number appears in Exports and can be used to link users from your HR software to Kimai.
API tokens
Each user can generate multiple API tokens.
Each token has the following fields:
- name, which is only for yourself for simpler identification.
- expiration date which is optional - if set, this token won’t work from the configured date on
- last usage will be updated once a minute, when used - helps to identify obsolete tokens
A token is shown exactly once: directly after it was created. Afterwards it is no longer displayed, so it has to be copied before leaving the page.
Tokens and passwords
API tokens are independent credentials and are not linked to the user’s password:
- changing the password or requesting a new one does not revoke any token
- a token stays valid until it expires or is deleted
- deactivating the user blocks all tokens of this user, re-activating the user makes them work again
To revoke access for a token, delete it in the user profile.
Treat tokens like passwords: create one token per integration, set an expiration date where possible
and delete tokens which are no longer used (see last usage).
Connect with QR code
Right after a token was created, Kimai renders a QR code together with it. It carries the server URL and the new token, so an app can be configured by scanning it, instead of letting the user type a 25 character token on a phone keyboard.
The payload is plain JSON and not a URL: scanning it with a generic camera app shows text and does not open anything. Apps have to use their own in-app scanner.
Filter and search
The search supports filtering by the fields:
rolestate(active, deactivated, all)
Besides these filters, you can query for a free search term, which will be searched in the fields:
usernamealiastitleemail
Additionally, you can filter for custom fields by using a search phrase like location:homeoffice.
This would find all entries with the custom field location matching the term homeoffice.
The search terms will be found within the full value, so searching for office would find:
I love working in my officeOfficeThis office is beautifulOur offices are very noisy
Attention: checkboxes have the values 0 (not checked) and 1 (checked).
You can mix the search term and use multiple meta-field queries:
location:homeoffice hello- find all entries matching the search termhellowith the custom fieldlocationmatching the termhomeofficelocation:homeoffice contract:fulltime- find all entries with the custom field combination:locationmatchinghomeofficeandcontractmatchingfulltimeexpired:0finds all items whoseexpiredcheckbox isoff
There are also special operators, which can be used in conjunction with custom fields:
- The
empty string (e.g.location:) will find all entries whose value in thelocationfield is either empty or not existing - The
~search term (e.g.location:~) will find all entries that are missing the custom field (created before the field was created) - The
*search term (e.g.location:*) will find all entries that have any value in thelocationfield (basically the opposite of~)
Password
These functions only apply to accounts which log in with a Kimai password. LDAP and SAML users manage their password in the external system.
Change password
Users can change their own password in their profile, which requires to enter the current password. Administrators can set a new password for other users, without knowing the old one.
After a password change:
- the old password stops working immediately
- all other logged-in browser sessions of this user are logged out, including
Remember melogins - the session in which the password was changed stays logged in
- password reset links which were sent before the change stop working
A password change does not revoke API tokens: integrations and apps using one of the user’s tokens keep working. If you change a password because the account might be compromised, also review the API tokens of this user and delete the ones you don’t know or trust.
Request new password
Administrators can activate Request new password when editing a user (or creating a new one).
The user then has to choose a new password before they can continue to work in Kimai: they are redirected to the password form
on their next page view, even if they are already logged in or come back through Remember me.
The old password keeps working until the user has set the new one. API calls are not affected by this setting, existing API tokens keep working.
Forgot password
The forgot password function is enabled by default, you can deactivate it through System → Settings.
A user can reach it via a link from the login screen. After entering username or email-address, an email with a login link will be sent. Clicking this link logs the user in and they have to choose a new password, before they can continue to work in Kimai.
For security reasons, the form always shows the same confirmation, even if the account does not exist or cannot use this function (e.g. LDAP and SAML users). In these cases no email is sent.
The link expires after the configured lifetime and becomes invalid as soon as the password was changed. Like every other password change, this logs out all other sessions of the user, but does not revoke API tokens.
You can configure two settings to influence the security:
- Token lifetime (in seconds: 3600 = 1 hour) - the allowed time before a link expires
- Retry pause (in seconds: 3600 = 1 hour) - the allowed time between multiple retries
As this feature requires an email to work, you have to enable email support to use it.
On-premise installations additionally need the TRUSTED_HOSTS environment variable, see the installation documentation.
Without it, the forgot password function is disabled.
Login
User can log in with a username or email. Administrators can activate different login methods (like LDAP or SAML) as well.
Your login works for at least one week in the Remember me mode.
After coming back and being remembered you have access to all the following features:
- view your own timesheet
- start and stop new records
- edit existing records
If you are an administrator, you will see all your allowed options in the menu, but will be redirected to a special confirmation/login form when you try to access them. This is a security feature to prevent abuse in case you forgot to log-out in public environments.
Two-Factor authentication
Kimai supports 2FA (Two-Factor) authentication via TOTP tokens.
Two-factor authentication can be enabled per account by all users, including SAML accounts.
The QR code is only shown to the user while setting up 2FA. Scan it with every authenticator app you want to use before confirming. Once 2FA is active, the code is no longer shown. To add a device later, deactivate 2FA and set it up again: this creates a new code, and all previously added devices stop working.
Super-Admins cannot see or set up the code for other users, but they can deactivate 2FA for any account, for example when a user lost their device.
Troubleshooting
Cannot create user
If you try to create a user and see an error message like The email is already used or The username is already used
it is very likely, that this account was deactivated in the past. Deactivation does not remove a user from Kimai,
it just hides it from all views and listing.
You can reactivate the account by going to the User administration, open the
search and choose the value Both or No for the search option Active. The resulting list will include all
deactivated users which can be reactivated by editing them and checking the Active checkbox.
Recorded times are wrong
Please read the user preferences documentation especially the part about timezones.
The timezone is a user-specific setting and every user can have its own timezone setting. Don’t mix this up with the system specific configuration for new customers.
Permissions
Admin
| Name | Description |
|---|---|
view_user |
View the Users screen at System > Users - attention System-Admins will always own that permission |
create_user |
Create new users |
delete_user |
SECURITY ALERT - delete existing users |
Permissions for the own user account
| Name | Description |
|---|---|
api-token_own_profile |
Change the own API token |
edit_own_profile |
Edit own user profile/account |
hourly-rate_own_profile |
Edit the own (user specific) hourly rate |
password_own_profile |
Change own password (should be deactivated when LDAP is used) |
preferences_own_profile |
Allows a user to edit the own preferences |
roles_own_profile |
SECURITY ALERT - change the own user roles |
supervisor_own_profile |
Change the supervisor for the own profile |
teams_own_profile |
Edit team assignments in own user profile |
view_own_profile |
View own user profile and statistics |
Permissions for profiles of other user accounts
| Name | Description |
|---|---|
api-token_other_profile |
Change the API token for other users |
edit_other_profile |
SECURITY ALERT - edit the profile for another user |
hourly-rate_other_profile |
Edit other (users specific) hourly rate |
password_other_profile |
SECURITY ALERT - Change the password for another user |
preferences_other_profile |
Change the preferences for another user |
roles_other_profile |
SECURITY ALERT - change roles for other users, set the ‘system account’ and ‘password reset’ flag |
supervisor_other_profile |
Change the supervisor for the selected profile |
teams_other_profile |
Edit team assignments in other user profile |
view_other_profile |
View other user profiles |
Read how to assign these permissions to your user roles in the permission documentation.
Related articles
- User preferences – Settings that change the users personal Kimai experience
- Offboarding users – The recommended way to handle Kimai accounts of employees who leave your company, without losing historical timesheet data