Context / Get current user
Task in alpha phase
This Data Factory task is in phase: it is available on every account, and we keep improving it. Share your feedback with the Product-Live team at contact@product-live.com.
This task allows to get the user information of the user that is executing the job.
Task name:
Examples
json
{
"name": "context-user-get",
"taskReferenceName": "get_current_user",
"description": "Get current user",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {}
}1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
json
{
"name": "context-user-get",
"taskReferenceName": "get_current_user",
"description": "Get current user",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"outputs": [
{
"mediaType": "application/xml",
"outputMode": "ATTACHMENT",
"outputKey": "xml"
}
]
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Definition
| Property | Type | Required | Description |
|---|---|---|---|
| The name (or type) of the task | |||
| The unique name of the task in your job. It is used to reference this task in the workflow. | |||
| The functional description of this task in your job. | |||
The type of the task. It must be SUB_WORKFLOW. | |||
| : | true: the job continues if there is an error on this task. false: the job fails. | ||
| Input parameters of the task. See below |
Inputs Parameters
| Property | Type | Required | Description |
|---|---|---|---|
Default: [{"mediaType": "application/json", "outputMode": "INLINE", "outputKey": "json"}]. | The outputs of the request. | ||
The media type of the output. application/json and application/xml are supported. | |||
INLINE: The output is provided inline in the output object. ATTACHMENT: The output is provided as an attachment in the output object. INLINE is only supported for mediaType=application/json | |||
| The key of the output. | |||
Default: default. The model/format used in the output. Only default is supported. |
Outputs
| Property | Type | Description |
|---|---|---|
| The number of elements returned by the task. | ||
The output map. Each key is configured by outputs[].outputKey. |
Json output - outputs[].mediaType=application/json
output.jsonis an array of objects as defined in the users API.- Please note that although a single user is returned here, an array containing a single element is returned.
jsonis the default output key but may be changed by setting theoutputKeyproperty.
With task reference get_current_user, use ${get_current_user.output.output.json} for the default JSON array and ${get_current_user.output.output.json[0].id} for its first ID. ${get_current_user.output} returns the complete task output, including totalElements; the second .output selects the output map. For an XML attachment with output key xml, read ${get_current_user.output.output.xml}.
Example output:
json
[
{
"object": "user",
"id": "1",
"createdAt": "2025-09-01T13:17:54.000Z",
"updatedAt": "2025-09-01T13:17:54.000Z",
"email": "user@example.com",
"firstName": "John",
"lastName": "Doe"
}
]1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
XML output - outputs[].mediaType=application/xml
Example output:
xml
<?xml version="1.0" encoding="UTF-8"?>
<array xmlns="http://www.w3.org/2005/xpath-functions">
<map>
<string key="object">user</string>
<string key="id">1</string>
<string key="createdAt">2025-09-01T13:17:54.000Z</string>
<string key="updatedAt">2025-09-01T13:17:54.000Z</string>
<string key="email">user@example.com</string>
<string key="firstName">John</string>
<string key="lastName">Doe</string>
</map>
</array>1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
Limits and additional notes
- When the
outputMode=INLINEis selected, the maximum number of elements returned by this task is limited to1000. If more elements are to be returned, the task ends with an error. To export up to the maximum of elements, use thelimitinput parameter to limit the number of elements return.