# IRPCViewsAdmin.GetViewsAndUsersAdmin

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [Common views administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViewsAdmin/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViewsAdmin/GetViewsAndUsersAdmin/

Badges: `Administration API / specialized` `admin` `session` `idempotent`

Gets all common views and the private views of all users, with the owner of each private view.

- **Service:** [Common views administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViewsAdmin/index.md) `MFiles.IRPCViewsAdmin`
- **gRPC method:** `/MFiles.IRPCViewsAdmin/GetViewsAndUsersAdmin`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-views-and-users-admin`
- **Request:** [`GetViewsAndUsersAdminRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViewsAdmin/GetViewsAndUsersAdmin/index.md#request)
- **Response:** [`GetViewsAndUsersAdminResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCViewsAdmin/GetViewsAndUsersAdmin/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** yes
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Requires a vault session with the vault rights `manage_users` and `archive`
  ([VaultAccess](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.VaultAccess/index.md)). The caller does not need a user account in the
  vault.
- `user_defined_views` and `user_accounts` are parallel lists: `user_accounts[i]` owns
  `user_defined_views[i]`, so an owner with several views appears several times. They are
  ordered by user ID. Views of the anonymous user are left out.
- The owner entries contain the ID, login name, vault roles, permissions and language of the
  user; `external_id` is not filled.
- The order of the common views is not specified. Names are in the session language.

<a id="request"></a>

## Request: GetViewsAndUsersAdminRequest

No fields.

<a id="response"></a>

## Response: GetViewsAndUsersAdminResponse

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page. Fields marked (recursive) refer to a type already on their path.

| Field | Type | Description |
|---|---|---|
| `user_defined_views[]` | repeated [`View`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.View/index.md) | The private views of all users. See [View](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.View/index.md). |
| `user_defined_views[].id` | `int32` | The ID of the view. |
| `user_defined_views[].type` | [`ViewType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ViewType/index.md) | The type of the view. Values: `VIEW_TYPE_SHOW_OBJECTS` (0), `VIEW_TYPE_FILTER_ONLY` (1). |
| `user_defined_views[].name` | `string` | The name of the view. |
| `user_defined_views[].is_common` | `bool` | Tells if the view is admin-defined (common) or user-defined. |
| `user_defined_views[].is_visible` | `bool` | Tells if the view is visible. |
| `user_defined_views[].location` | [`ViewLocation`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ViewLocation/index.md) | The location of the view. Valid only if bHasParent is true. |
| `user_defined_views[].location.parent_folder[]` | repeated [`Folder`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Folder/index.md) | Array of folders describing the parent folder of the view. The first element of the array must be a view folder. Other elements, if any, are property folders. |
| `user_defined_views[].location.customizes_property_folder` | `bool` | True if the view is overlapping with a property folder. |
| `user_defined_views[].location.customized_property_folder` | [`TypedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValue/index.md) | The overlapped property folder. Ignored if bOverlapping is false. |
| `user_defined_views[].content_definition` | [`SearchDef`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SearchDef/index.md) | The search definition that contains the view levels and search conditions of the view. |
| `user_defined_views[].content_definition.filter_conditions[]` | repeated [`SearchCondition`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SearchCondition/index.md) | The conditions that limit the object set of this search. |
| `user_defined_views[].content_definition.grouping_levels[]` | repeated [`GroupingLevel`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.GroupingLevel/index.md) | View levels (the display hierarchy of this search). |
| `user_defined_views[].content_definition.options` | [`SearchFlags`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SearchFlags/index.md) | Search flags. This affects the resulting object version set and also distinct view level values displayed inside this search. |
| `user_defined_views[].acl` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | Permissions. |
| `user_defined_views[].acl.checked_out_to_user` | `int32` | Specifies the ID of the user who has extended rights because of the checkout operation performed by her. 0 if such user does not exist. |
| `user_defined_views[].acl.is_fully_authoritative` | `bool` | Specifies whether this access control list is set to ignore the secondary permissions that come from the latest checked in version. |
| `user_defined_views[].acl.custom_component` | [`AccessControlListComponent`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponent/index.md) | Accesses the custom component of this ACL. |
| `user_defined_views[].acl.restrictive_components[]` | repeated [`AccessControlListComponentMapEntry`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponentMapEntry/index.md) | Accesses the restrictive automatic components of this ACL. |
| `user_defined_views[].acl.secondary_access_control_list` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) (recursive) | Secondary ACL used for latest version ACL. Not used for access check if null. |
| `user_defined_views[].acl.additive_components[]` | repeated [`AccessControlListComponentMapEntry`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponentMapEntry/index.md) | Accesses the additive automatic components of this ACL. |
| `user_defined_views[].flags_obsolete` | `uint32` | Bit flags that provide additional information on the view. |
| `user_defined_views[].options` | [`VIEWFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.VIEWFLAGS/index.md) | Bit flags that provide additional information on the view. |
| `user_defined_views[].options.all` | `bool` | Specifies all flags set; Including any future flags. |
| `user_defined_views[].options.indexed` | `bool` | Materialized/indexed view. |
| `user_defined_views[].options.incompatible_with_full_text_search` | `bool` | The search conditions of the view definition (excluding the grouping levels) are not compatible with full-text search. |
| `user_defined_views[].options.sort_across_all_pages_disabled` | `bool` | Sorting search results is disabled. |
| `user_defined_views[].guid` | `string` | GUID for the view. |
| `user_defined_views[].view_visualization` | [`ViewVisualization`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ViewVisualization/index.md) | View visualization information. |
| `user_defined_views[].view_visualization.subview_groups[]` | repeated [`SubviewGroup`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SubviewGroup/index.md) | The subviews of the view as groups. |
| `user_accounts[]` | repeated [`UserAccount`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.UserAccount/index.md) | The owner of each private view, in the order of `user_defined_views`. |
| `user_accounts[].id` | `int32` | The ID of the user account. |
| `user_accounts[].login_name` | `string` | The login name that is associated with this user account (e.g. 'DOMAIN\user'). |
| `user_accounts[].vault_roles` | [`VAULTROLES`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.VAULTROLES/index.md) | Bitmask of the vault roles of the user. |
| `user_accounts[].vault_roles.all` | `bool` | Specifies all flags set; Including any future flags. |
| `user_accounts[].vault_roles.full_control` | `bool` | Can perform any activity in the vault. |
| `user_accounts[].vault_roles.can_log_in` | `bool` | Can log in to the vault. |
| `user_accounts[].vault_roles.can_create_objects` | `bool` | Can create new documents. |
| `user_accounts[].vault_roles.can_see_all_objects` | `bool` | Sees all documents in listings, regardless of security settings and deletion state. |
| `user_accounts[].vault_roles.can_undelete_objects` | `bool` | Can undelete previously deleted documents. |
| `user_accounts[].vault_roles.can_destroy_objects` | `bool` | Has permission to permanently destroy documents. |
| `user_accounts[].vault_roles.can_force_undo_checkout` | `bool` | Has permission to undo a check-out performed by another user. |
| `user_accounts[].vault_roles.can_change_all_object_permissions` | `bool` | Can change the security settings of all documents and modify all documents. |
| `user_accounts[].vault_roles.can_change_metadata_structure` | `bool` | Can modify the meta data structure of the vault (propertydefs, profiles, value lists etc.). |
| `user_accounts[].vault_roles.can_manage_users` | `bool` | Can create, edit and delete user accounts. Cannot add or remove the Vault Manager role. |
| `user_accounts[].vault_roles.is_internal_user` | `bool` | An internal user of the vault. This role separates internal enad external users in the vault. |
| `user_accounts[].vault_roles.can_manage_traditional_folders` | `bool` | Can create, modify and delete traditional folders. OBSOLETE: const VAULTROLES VAULTROLE_DEFINE_TEMPLATES = 1 << 12;  //!< Can define templates. |
| `user_accounts[].vault_roles.can_manage_common_views` | `bool` | Can create, modify and delete common views. |
| `user_accounts[].vault_roles.can_manage_workflows` | `bool` | Can create, modify and delete workflows. Modifying event handlers within the workflow still requires SERVERACCESS_RUN_CODE. |
| `user_accounts[].vault_roles.cannot_manage_private_views` | `bool` | Cannot create or modify private views. |
| `user_accounts[].vault_roles.anonymous` | `bool` | Anonymous role. |
| `user_accounts[].vault_roles.run_code_on_server` | `bool` | Can run code on the server hosting this vault. Not included in VAULTROLE_FULL_CONTROL, and cannot be ordinarily granted by it. |
| `user_accounts[].acl` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | Permissions. |
| `user_accounts[].acl.checked_out_to_user` | `int32` | Specifies the ID of the user who has extended rights because of the checkout operation performed by her. 0 if such user does not exist. |
| `user_accounts[].acl.is_fully_authoritative` | `bool` | Specifies whether this access control list is set to ignore the secondary permissions that come from the latest checked in version. |
| `user_accounts[].acl.custom_component` | [`AccessControlListComponent`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponent/index.md) | Accesses the custom component of this ACL. |
| `user_accounts[].acl.restrictive_components[]` | repeated [`AccessControlListComponentMapEntry`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponentMapEntry/index.md) | Accesses the restrictive automatic components of this ACL. |
| `user_accounts[].acl.secondary_access_control_list` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) (recursive) | Secondary ACL used for latest version ACL. Not used for access check if null. |
| `user_accounts[].acl.additive_components[]` | repeated [`AccessControlListComponentMapEntry`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponentMapEntry/index.md) | Accesses the additive automatic components of this ACL. |
| `user_accounts[].user_language` | `int32` | The vault language of the user. |
| `user_accounts[].external_id` | `string` | The user identity in external system, such as Microsoft Entra (where the identity is a GUID). Read-only. |
| `u_common_views[]` | repeated [`View`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.View/index.md) | All common views. |
| `u_common_views[].id` | `int32` | The ID of the view. |
| `u_common_views[].type` | [`ViewType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ViewType/index.md) | The type of the view. Values: `VIEW_TYPE_SHOW_OBJECTS` (0), `VIEW_TYPE_FILTER_ONLY` (1). |
| `u_common_views[].name` | `string` | The name of the view. |
| `u_common_views[].is_common` | `bool` | Tells if the view is admin-defined (common) or user-defined. |
| `u_common_views[].is_visible` | `bool` | Tells if the view is visible. |
| `u_common_views[].location` | [`ViewLocation`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ViewLocation/index.md) | The location of the view. Valid only if bHasParent is true. |
| `u_common_views[].location.parent_folder[]` | repeated [`Folder`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Folder/index.md) | Array of folders describing the parent folder of the view. The first element of the array must be a view folder. Other elements, if any, are property folders. |
| `u_common_views[].location.customizes_property_folder` | `bool` | True if the view is overlapping with a property folder. |
| `u_common_views[].location.customized_property_folder` | [`TypedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValue/index.md) | The overlapped property folder. Ignored if bOverlapping is false. |
| `u_common_views[].content_definition` | [`SearchDef`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SearchDef/index.md) | The search definition that contains the view levels and search conditions of the view. |
| `u_common_views[].content_definition.filter_conditions[]` | repeated [`SearchCondition`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SearchCondition/index.md) | The conditions that limit the object set of this search. |
| `u_common_views[].content_definition.grouping_levels[]` | repeated [`GroupingLevel`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.GroupingLevel/index.md) | View levels (the display hierarchy of this search). |
| `u_common_views[].content_definition.options` | [`SearchFlags`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SearchFlags/index.md) | Search flags. This affects the resulting object version set and also distinct view level values displayed inside this search. |
| `u_common_views[].acl` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | Permissions. |
| `u_common_views[].acl.checked_out_to_user` | `int32` | Specifies the ID of the user who has extended rights because of the checkout operation performed by her. 0 if such user does not exist. |
| `u_common_views[].acl.is_fully_authoritative` | `bool` | Specifies whether this access control list is set to ignore the secondary permissions that come from the latest checked in version. |
| `u_common_views[].acl.custom_component` | [`AccessControlListComponent`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponent/index.md) | Accesses the custom component of this ACL. |
| `u_common_views[].acl.restrictive_components[]` | repeated [`AccessControlListComponentMapEntry`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponentMapEntry/index.md) | Accesses the restrictive automatic components of this ACL. |
| `u_common_views[].acl.secondary_access_control_list` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) (recursive) | Secondary ACL used for latest version ACL. Not used for access check if null. |
| `u_common_views[].acl.additive_components[]` | repeated [`AccessControlListComponentMapEntry`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponentMapEntry/index.md) | Accesses the additive automatic components of this ACL. |
| `u_common_views[].flags_obsolete` | `uint32` | Bit flags that provide additional information on the view. |
| `u_common_views[].options` | [`VIEWFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.VIEWFLAGS/index.md) | Bit flags that provide additional information on the view. |
| `u_common_views[].options.all` | `bool` | Specifies all flags set; Including any future flags. |
| `u_common_views[].options.indexed` | `bool` | Materialized/indexed view. |
| `u_common_views[].options.incompatible_with_full_text_search` | `bool` | The search conditions of the view definition (excluding the grouping levels) are not compatible with full-text search. |
| `u_common_views[].options.sort_across_all_pages_disabled` | `bool` | Sorting search results is disabled. |
| `u_common_views[].guid` | `string` | GUID for the view. |
| `u_common_views[].view_visualization` | [`ViewVisualization`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ViewVisualization/index.md) | View visualization information. |
| `u_common_views[].view_visualization.subview_groups[]` | repeated [`SubviewGroup`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SubviewGroup/index.md) | The subviews of the view as groups. |
