> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GetProjectsForUser

> Call GetProjectsForUser in the ABBYY FlexiCapture API to retrieve Application Server projects filtered by a user ID and role type access permissions.

## What it does

Gets information about the projects on the Application Server, taking into account a user's access permissions.

## Definition

```
Project [] GetProjectsForUser( int userId, int roleType );
```

## Parameters

| **Name** | **Type** | **Description**                                                                                                |
| -------- | -------- | -------------------------------------------------------------------------------------------------------------- |
| userId   | int      | User ID                                                                                                        |
| roleType | int      | The ID of the user's role type. See [RoleType](/flexi-capture/api/structures/t-role-type) for possible values. |

## Returned value

<table width="100%"><tbody><tr><td><p><strong>Type</strong></p></td><td><p><strong>Description</strong></p></td></tr><tr><td><p><a href="/flexi-capture/api/structures/project">Project</a>\[]</p></td><td><p>A set of records, each of which contains information about one of the projects. The set is created based on the values of the input parameters as follows:</p><ul><li>userId\<>0, roleType\<>0 the projects where this user has access permissions to at least one of the batch types for the specified role</li><li>userId\<>0, roleType=0 the projects where this user has some access permissions to at least one of the batch types</li><li>userId=0, roleType=0 the list of all projects</li><li>userId=0, roleType\<>0 empty list</li></ul></td></tr></tbody></table>
