|
| 1 | +--- |
| 2 | +title: IdentitySelector UI element |
| 3 | +description: Describes the Microsoft.ManagedIdentity.IdentitySelector UI element for Azure portal. Use to assign managed identities to a resource. |
| 4 | +author: tfitzmac |
| 5 | + |
| 6 | +ms.topic: conceptual |
| 7 | +ms.date: 02/06/2020 |
| 8 | +ms.author: tomfitz |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +# Microsoft.ManagedIdentity.IdentitySelector UI element |
| 13 | + |
| 14 | +A control for assigning [managed identities](../../active-directory/managed-identities-azure-resources/overview.md) for a resource in a deployment. |
| 15 | + |
| 16 | +## UI sample |
| 17 | + |
| 18 | +The control consists of the following elements: |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | +When the user selects **Add**, the following form opens. The user can select one or more user-assigned identities for the resource. |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | +The selected identities are displayed in the table. The user can add or delete items from this table. |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | +## Schema |
| 31 | + |
| 32 | +```json |
| 33 | +{ |
| 34 | + "name": "identity", |
| 35 | + "type": "Microsoft.ManagedIdentity.IdentitySelector", |
| 36 | + "label": "Managed Identity Configuration", |
| 37 | + "toolTip": { |
| 38 | + "systemAssignedIdentity": "Enable system assigned identity to grant the resource access to other existing resources.", |
| 39 | + "userAssignedIdentity": "Add user assigned identities to grant the resource access to other existing resources." |
| 40 | + }, |
| 41 | + "defaultValue": { |
| 42 | + "systemAssignedIdentity": "Off" |
| 43 | + }, |
| 44 | + "options": { |
| 45 | + "hideSystemAssignedIdentity": false, |
| 46 | + "hideUserAssignedIdentity": false, |
| 47 | + "systemAssignedIdentityReadOnly": false |
| 48 | + }, |
| 49 | + "visible": true |
| 50 | +} |
| 51 | +``` |
| 52 | + |
| 53 | +## Sample output |
| 54 | + |
| 55 | +```json |
| 56 | +{ |
| 57 | + "identity": { |
| 58 | + "value": { |
| 59 | + "type": "UserAssigned", |
| 60 | + "userAssignedIdentities": { |
| 61 | + "/subscriptions/xxxx/resourceGroups/TestResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/TestUserIdentity1": {} |
| 62 | + } |
| 63 | + } |
| 64 | + } |
| 65 | +} |
| 66 | +``` |
| 67 | + |
| 68 | +## Remarks |
| 69 | + |
| 70 | +- Use **defaultValue.systemAssignedIdentity** to set an initial value for the system assigned identity options control. The default value is **Off**, which indicates no system assigned identity is assigned to the resource. |
| 71 | +- If **options.hideSystemAssignedIdentity** is set to **true**, the UI to configure the system assigned identity isn't displayed. The default value for this option is **false**. |
| 72 | +- If **options.hideUserAssignedIdentity** is set to **true**, the UI to configure the user assigned identity isn't displayed. The resource isn't assigned a user assigned identity. The default value for this option is **false**. |
| 73 | +- If **options.systemAssignedIdentityReadOnly** is set to **true**, the user can't edit the initial value for the system assigned identity. The default value for this option is **false**. |
| 74 | +- The following default text is displayed in the description below the **system** assigned identity section label. You can override the default text by specifying a message in **toolTip.systemAssignedIdentity**. |
| 75 | + |
| 76 | + *A system assigned managed identity enables Azure resources to authenticate to cloud services (e.g. Azure Key Vault) without storing credentials in code. Once enabled, all necessary permissions can be granted via Azure role-based-access-control. The lifecycle of this type of managed identity is tied to the lifecycle of this resource. Additionally, each resource (e.g. Virtual Machine) can only have one system assigned managed identity. [Learn more about Managed identities](https://go.microsoft.com/fwlink/?LinkId=854449).* |
| 77 | + |
| 78 | +- The following default text is displayed in the description below the **user** assigned identity section label. You can override the default text by specifying a message in **toolTip.userAssignedIdentity**. |
| 79 | + |
| 80 | + *User assigned managed identities enable Azure resources to authenticate to cloud services (e.g. Azure Key Vault) without storing credentials in code. This type of managed identities are created as standalone Azure resources, and have their own lifecycle. A single resource (e.g. Virtual Machine) can utilize multiple user assigned managed identities. Similarly, a single user assigned managed identity can be shared across multiple resources (e.g. Virtual Machine). [Learn more about Managed identities](https://go.microsoft.com/fwlink/?LinkId=854449).* |
| 81 | + |
| 82 | +## Next steps |
| 83 | + |
| 84 | +- For an introduction to creating UI definitions, see [Getting started with CreateUiDefinition](create-uidefinition-overview.md). |
| 85 | +- For a description of common properties in UI elements, see [CreateUiDefinition elements](create-uidefinition-elements.md). |
0 commit comments