Users (IRPCUsersAdmin)
Adds, reads, modifies and removes the user accounts of a vault: who may use the vault, with which vault roles.
Use this interface to add, modify and delete user accounts in a vault.
A user account is always associated with a login. The login defines the authentication type and password (if not a Windows login). The user account in a vault just grants a login access to that vault and specifies the vault-level roles of the user. The user account has an ID that remains constant and is used to identify the user in the database (such as 'Last modified by' entry of document). The user account can be associated with a different login without changing the user ID in the vault.
Use the IRPCLoginsAdmin and/or IRPCVaultLoginsAdmin interface to manage logins.
| gRPC service | MFiles.IRPCUsersAdmin |
|---|---|
| Book and level | Administration API, specialized |
| Methods | 11 |
| Proto file | mfiles/IRPCUsersAdmin.proto |
Overview
M-Files Admin uses this service for the Users node of a vault; administration scripts can use it
to provision users. All methods need a vault session whose user has the vault right
manage_users (VaultAccess); the write methods also need
license_allows_modifications. The vault role full control (and a system administrator's
full_control_of_vaults) grants both.
Login accounts and user accounts. M-Files separates who can authenticate from who may use a vault:
| Account | Stored in | Managed with | What it holds |
|---|---|---|---|
| Server login account | The server | IRPCLoginsAdmin | Login: account type (M-Files or Windows), user name, password, server roles, license type, full name, email. One login can be used in every vault of the server. |
| Vault login account | One vault | IRPCVaultLoginsAdmin | The same Login message, valid for that vault only. Exists only on servers with vault login accounts enabled, such as M-Files Cloud. |
| User account | One vault | This service | UserAccount: the vault user ID, the login it belongs to (login_name) and the vault roles. |
- A login authenticates; a user account grants that login access to one vault. A login without a user account in the vault cannot open the vault.
UserAccount.login_nameis the login's account name: the user name of an M-Files login (MikeT) or the down-level logon name of a Windows login (domain and user name separated by a backslash).- The user ID never changes. Objects refer to it (Created by, Last modified by, permissions), so pointing a user account to another login keeps all references.
- Managing server login accounts needs the system administrator server role (server right
manage_logins); managing user accounts and vault login accounts needs only the vault rightmanage_users.
Methods by task:
- Read: GetUsers, GetUser, SearchForUser (by login name).
- Add or bring back: AddUser (preferred), AddOrUndeleteUser, UndeleteUserByGUID.
- Change and remove: ModifyUser, RemoveUser.
- Follow changes: GetChangedUserAccounts.
Typical provisioning: make sure the login exists (server or vault login), then
AddUser with login_name set to the login's account
name, then add the user to groups with
AddMemberToUserGroup.
Users who lack manage_users read users and groups through
IRPCVault, for example
GetUsersAndUserGroups and
GetUserGroups.
Accounts with an External ID. UserAccount.external_id links the account to an identity in
an external system such as Microsoft Entra; identity synchronization (M-Files Manage) maintains
it. These methods cannot change it, and removing such an account can fail with "Access denied"
("... should be deleted via Manage").
Methods
| Method | Summary | Facts |
|---|---|---|
| AddOrUndeleteUser | Adds a user account, or brings back a removed one with the same login name. | admin session |
| AddOrUndeleteUserViaADSync | Adds a user account during a directory import; brings back a removed account only when the vault allows that. | internal: not for applications admin session |
| AddUser | Adds a user account to the vault, or brings back a removed one. | admin session |
| GetChangedUserAccounts | Gets the user accounts that were added, changed or removed after a version token. | admin session |
| GetUser | Gets one user account by ID. | admin session |
| GetUsers | Gets all user accounts of the vault. | admin session idempotent |
| IsVaultReadyForM365StoragePermissions | Tells whether the vault meets the user identity precondition for projecting M-Files permissions to Microsoft 365 storage. | internal: not for applications admin session idempotent |
| ModifyUser | Replaces the data of an existing user account. | admin session idempotent |
| RemoveUser | Removes a user account from the vault. | admin session |
| SearchForUser | Finds the user account of a login name. | admin session |
| UndeleteUserByGUID | Brings back a removed user account, identified by its GUID in the Users value list. | admin session |