Skip to content

Commit d8908f5

Browse files
committed
update
1 parent 7724cc2 commit d8908f5

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

articles/azure-resource-manager/bicep/bicep-functions-deployment.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Bicep functions - deployment
33
description: Describes the functions to use in a Bicep file to retrieve deployment information.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
6-
ms.date: 05/14/2025
6+
ms.date: 05/16/2025
77
---
88

99
# Deployment functions for Bicep
@@ -14,19 +14,26 @@ This article describes the Bicep functions for getting values related to the cur
1414

1515
`deployer()`
1616

17-
Returns the information about the current deployment principal.
17+
Returns information about the principal (identity) that initiated the current deployment. The principal can be a user, service principal, or managed identity, depending on how the deployment was started.
1818

1919
Namespace: [az](bicep-functions.md#namespaces-for-functions).
2020

2121
### Return value
2222

23-
This function returns the information about the current deployment principal, including object ID, tenant ID, and user principal name.
23+
This function returns an object with details about the deployment principal, including:
24+
25+
- `objectId`: The Microsoft Entra ID object ID of the principal.
26+
- `tenantId`: The Microsoft Entra ID tenant ID.
27+
- `userPrincipalName`: The user principal name (UPN) if available. For service principals or managed identities, this property may be empty.
28+
29+
> [!NOTE]
30+
> The returned values depend on the deployment context. For example, `userPrincipalName` may be empty for service principals or managed identities.
2431
2532
```json
2633
{
27-
"objectId": "",
28-
"tenantId": "",
29-
"userPrincipalName": ""
34+
"objectId": "<principal-object-id>",
35+
"tenantId": "<tenant-id>",
36+
"userPrincipalName": "<[email protected] or empty>"
3037
}
3138
```
3239

@@ -38,7 +45,7 @@ The following example Bicep file returns the deployer object.
3845
output deployer object = deployer()
3946
```
4047

41-
The preceding example returns the following object:
48+
Sample output (values differ based on your deployment):
4249

4350
```json
4451
{
@@ -48,6 +55,8 @@ The preceding example returns the following object:
4855
}
4956
```
5057

58+
For more information about Azure identities, see [What is an Azure Active Directory identity?](/azure/active-directory/fundamentals/active-directory-whatis).
59+
5160
## deployment
5261

5362
`deployment()`

0 commit comments

Comments
 (0)