# GetServerObjectMetaDataForUser Method

## Overloads

| [GetServerObjectMetaDataForUser(Guid, String)](https://help.qlik.com/en-US/qlikview-developer/September2026/Subsystems/QMSAPIref/Content/PIX.Services.V12.Api8.IQMS8.GetServerObjectMetaDataForUser.htm#PIX_Services_V12_Api8_IQMS8_GetServerObjectMetaDataForUser_System_Guid_System_String_) |  | Retrieves a list of all ServerObjectMetaData objects from a QlikView Server, accessible to a certain user. |
| --- | --- | --- |

[](https://help.qlik.com/en-US/qlikview-developer/Subsystems/QMSAPIref/Content/PIX.Services.V12.Api8.IQMS8.GetServerObjectMetaDataForUser.htm) [](https://help.qlik.com/en-US/qlikview-developer/Subsystems/QMSAPIref/Content/PIX.Services.V12.Api8.IQMS8.GetServerObjectMetaDataForUser.htm)

## GetServerObjectMetaDataForUser(Guid, String)

Retrieves a list of all ServerObjectMetaData objects from a QlikView Server, accessible to a certain user.

### Declaration

```

          List<ServerObjectMetaData> GetServerObjectMetaDataForUser(Guid qvsID, string user)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.Guid | qvsID | The ID of the QlikView Server managing the document. |
| System.String | user | The user id to retrieve server objects for. |

### Returns

| Type | Description |
| --- | --- |
| System.Collections.Generic.List&lt;[ServerObjectMetaData](https://help.qlik.com/en-US/qlikview-developer/September2026/Subsystems/QMSAPIref/Content/PIX.QMSAPI.DataObjects.ServerObjectMetaData.htm)&gt; | A list of [ServerObjectMetaData](https://help.qlik.com/en-US/qlikview-developer/September2026/Subsystems/QMSAPIref/Content/PIX.QMSAPI.DataObjects.ServerObjectMetaData.htm) objects. |

### Remarks

##### security

Requires membership of local group *QlikView Management API*.

### Examples

This example retrieves all ServerObjectMetaData's from a QVS, accessible by a certain user.

The service key injection is assumed to be handled behind the scenes. For an example of how to inject the service key, see Samples.

```
using System;
using System.Collections.Generic;
using System.Linq;
using QMSAPI;

class Program
{
    static void Main(string[] args)
    {
        try
        {
            // create a QMS API client
            IQMS apiClient = new QMSClient();

            //retrieve a time limited service key
            ServiceKeyClientMessageInspector.ServiceKey = apiClient.GetTimeLimitedServiceKey();

            ServiceInfo qvsService = apiClient.GetServices(ServiceTypes.QlikViewServer).FirstOrDefault();
            if( qvsService != null)
            {
                List<ServerObjectMetaData> serverObjectMetaDatas = apiClient.GetServerObjectMetaDataForUser( qvsService.ID, "SomeDomain\\johndoe");
                serverObjectMetaDatas.ForEach(meta=>
                {
                    Console.WriteLine("Id: " + meta.Id);
                    Console.WriteLine("Type: " + meta.Type );
                    Console.WriteLine("Sub type: " + meta.SubType);
                    Console.WriteLine("Document: " + meta.DocumentName);
                });
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine("An exception occurred: " + ex.Message);
        }
        // wait for user to press any key
        Console.ReadLine();
    }
}
```

### See Also

[ServerObjectMetaData](https://help.qlik.com/en-US/qlikview-developer/September2026/Subsystems/QMSAPIref/Content/PIX.QMSAPI.DataObjects.ServerObjectMetaData.htm)