> For the complete documentation index, see [llms.txt](https://docs.soraco.co/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.soraco.co/docs/faq/how-to-get-the-activated-computers-for-a-given-activation-key.md).

# How to get the activated computers for a given activation key

To get the activated computers for a given activation key, there are 2 cases to consider: (a) the activation key is a single activation key and (b) the activation key is a multiple activations key.

In both cases, you need to use the GetDataSetEx API. For single activation keys, the "table" argument of GetDataSetEx must be set to "qryLicenseInfo". For multiple activation keys, the "table" argument of GetDataSetEx must be set to "qryActivationLog" (or "ActivationLog" for QLM v8 and earlier).

*Note that in order to call the GetDataSetEx method, you must set the license.AdminEncryptionKey property. It is not recommended to call this method from your application. The GetDataSetEx method belongs to the* [*QLM Management API group*](https://support.soraco.co/hc/en-us/sections/201720373-License-Server-Management-API) *which should never be called from the application. It should be called from your server.*

**Single Activation Key Example**

{% code overflow="wrap" %}

```csharp
// make sure to strip out dashes from the activationKey 
string activationKey = "AMTP0R0K00GHJ3K38N3Q1S17TX552TTFV3W8R8";
string dataSet = string.Empty;
string response = string.Empty;

license.GetDataSetEx(string.Empty, "qryLicenseInfo", "ActivationKey='" + activationKey + "'", ref dataSet, out response);

DataSet ds = new DataSet("NewDataSet");
XmlReader reader = new XmlTextReader(dataSet, XmlNodeType.Document, null);
if (!String.IsNullOrEmpty(dataSet))
{
    ds.ReadXml(reader);
    if (ds.Tables[0].Rows.Count > 0)
    {
        DataRowCollection drc = ds.Tables[0].Rows;
        if (drc != null)
        {
            foreach (DataRow dr in drc)
            {
                string computerKey = dr["computerkey"].ToString();
                string computerName = dr["computerName"].ToString();
                string computerID = dr["computerID"].ToString();
            }
        }
    }
}
```

{% endcode %}

**Multiple Activations Key Example**

{% code overflow="wrap" %}

```csharp
// make sure to strip out dashes from the activationKey 
string activationKey = "AMTP0R0K00GHJ3K38N3Q1S17TX552TTFV3W8R8"; 
string dataSet = string.Empty;
string response = string.Empty;

license.GetDataSetEx(string.Empty, "qryActivationLog", "ActivationKey='" + activationKey + "'", ref dataSet, out response);

DataSet ds = new DataSet("NewDataSet");
XmlReader reader = new XmlTextReader(dataSet, XmlNodeType.Document, null);
if (!String.IsNullOrEmpty(dataSet))
{
    ds.ReadXml(reader);
    if (ds.Tables[0].Rows.Count > 0)
    {
        DataRowCollection drc = ds.Tables[0].Rows;
        if (drc != null)
        {
            foreach (DataRow dr in drc)
            {
                string computerKey = dr["computerkey"].ToString();
                string computerName = dr["computerName"].ToString();
                string computerID = dr["computerID"].ToString();
            }
        }
    }
}
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.soraco.co/docs/faq/how-to-get-the-activated-computers-for-a-given-activation-key.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
