Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Troubleshooting/FAQ/Administration of M-Files

M-Files Manage: cannot modify login accounts with API if the user is in multiple vaults or servers

Last updated on 30 October 2024 · 3 min read

Admin
M-Files Manage

Overview

It is currently not possible to modify the "Login Accounts" using either M-Files Admin Tool or the M-Files Server API (e.g., the ModifyLoginAccount method) in case you have M-Files Manage in use, and if the user is added into multiple vaults in same M-Files Manage subscription or has any admin access level to the subscription. 

If you attempt to modify such a Login Account using either M-Files Admin Tool or the API, the result is an error (like the error mentioned below) if:

  • The vault tries to handle an account that has access to any other server or vault.
  • The server tries to handle an account that has access to any other server or any vault on another server.
  • Either tries to handle an account that has any level of admin access to the subscription.

Example Error Stack

System.Runtime.InteropServices.COMException (0x80040001): You can't do this due to security reasons.

CoServerLoginAccountOperations.cpp, 298, You can't do this due to security reasons. (0x8004049B)

RPCLoginsAdmin.cpp, 2569, You can't do this due to security reasons. (0x8004049B)

RPCLoginsAdmin.cpp, 466, You can't do this due to security reasons. (0x8004049B)

RPCLoginsHelper.cpp, 2548, You can't do this due to security reasons. (0x8004049B)

RPCLoginsHelper.cpp, 2692, You can't do this due to security reasons. (0x8004049B)

UserAccountOneDb.cpp, 917, You can't do this due to security reasons. (0x8004049B)

UserAccountOneDb.cpp, 1422, You can't do this due to security reasons. (0x8004049B)

RestApi.cpp, 674, You can't do this due to security reasons. (0x8004049B)

RestApi.cpp, 622, You can't do this due to security reasons. (0x8004049B)

RestApi.cpp, 734, You can't do this due to security reasons. (0x8004049B)

RestApi.cpp, 721, You can't do this due to security reasons. (0x8004049B)

RestApi.cpp, 847, You can't do this due to security reasons. (0x8004049B)

RestApi.cpp, 1612, You can't do this due to security reasons. (0x8004049B)

(M-Files 24.6.13797.6 2024-10-04T11:07:01.466Z)

Details

This behavior is by design, as there are security concerns in allowing modification of Login Accounts like this. 

Only a user who only has an account on a single server/vault can be handled through that specific server/vault, but no other. Therefore, this is not a solution for modifying all users/logins.

Solution

To modify Login Accounts, you must use M-Files Manage. You can edit logins either manually, or by using a form of provisioning (in which case you should not be modifying them in other ways anyway - manually or via the API/Admin).

We also have an existing improvement request with ID 170949 for implementing an API capability to modify login accounts for subscriptions/vaults/servers joined to M-Files Manage (OneDb), you can monitor the release notes to know when it becomes available.

Still need help?