|
| 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 | + }, |
| 48 | + "visible": true |
| 49 | +} |
| 50 | +``` |
| 51 | + |
| 52 | +## Sample output |
| 53 | + |
| 54 | +```json |
| 55 | +{ |
| 56 | + "identity": { |
| 57 | + "value": { |
| 58 | + "type": "UserAssigned", |
| 59 | + "userAssignedIdentities": { |
| 60 | + "/subscriptions/xxxx/resourceGroups/TestResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/TestUserIdentity1": {} |
| 61 | + } |
| 62 | + } |
| 63 | + } |
| 64 | +} |
| 65 | +``` |
| 66 | + |
| 67 | +## Remarks |
| 68 | + |
| 69 | +- Use **defaultValue.systemAssignedIdentity** to set an initial value for the system assigned identity options control. The default value is **Off**. The following values are allowed: |
| 70 | + - **On** – A system assigned identity is assigned to the resource. |
| 71 | + - **Off** – A system assigned identity isn't assigned to the resource. |
| 72 | + - **OnOnly** – A system assigned identity is assigned to the resource. Users can't edit this value during deployment. |
| 73 | + - **OffOnly** – A system assigned identity isn't assigned to the resource. Users can't edit this value during deployment. |
| 74 | + |
| 75 | +- 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**. |
| 76 | +- 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**. |
| 77 | + |
| 78 | +## Next steps |
| 79 | + |
| 80 | +- For an introduction to creating UI definitions, see [Getting started with CreateUiDefinition](create-uidefinition-overview.md). |
| 81 | +- For a description of common properties in UI elements, see [CreateUiDefinition elements](create-uidefinition-elements.md). |
0 commit comments