Skip to main content

entities

Creates, updates, deletes, gets or lists an entities resource.

Overview

Nameentities
TypeResource
Idazure.management_groups.entities

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe fully qualified ID for the entity. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000.
namestringThe name of the entity. For example, 00000000-0000-0000-0000-000000000000.
displayNamestringThe friendly name of the management group.
inheritedPermissionsstringThe users specific permissions to this item. Known values are: "noaccess", "view", "edit", and "delete". (noaccess, view, edit, delete)
numberOfChildGroupsintegerNumber of children is the number of Groups that are exactly one level underneath the current Group.
numberOfChildrenintegerNumber of children is the number of Groups and Subscriptions that are exactly one level underneath the current Group.
numberOfDescendantsintegerNumber of Descendants.
parentobject(Optional) The ID of the parent management group.
parentDisplayNameChainarrayThe parent display name chain from the root group to the immediate parent.
parentNameChainarrayThe parent name chain from the root group to the immediate parent.
permissionsstringThe users specific permissions to this item. Known values are: "noaccess", "view", "edit", and "delete". (noaccess, view, edit, delete)
tenantIdstringThe AAD Tenant ID associated with the entity. For example, 00000000-0000-0000-0000-000000000000.
typestringThe type of the resource. For example, Microsoft.Management/managementGroups.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselect$skiptoken, $skip, $top, $select, $search, $filter, $view, groupName, Cache-ControlList all entities (Management Groups, Subscriptions, etc.) for the authenticated user.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
$filterstringThe filter parameter allows you to filter on the the name or display name fields. You can check for equality on the name field (e.g. name eq '{entityName}') and you can check for substrings on either the name or display name fields(e.g. contains(name, '{substringToSearch}'), contains(displayName, '{substringToSearch')). Note that the '{entityName}' and '{substringToSearch}' fields are checked case insensitively. Default value is None.
$searchstringThe $search parameter is used in conjunction with the $filter parameter to return three different outputs depending on the parameter passed in. With $search=AllowedParents the API will return the entity info of all groups that the requested entity will be able to reparent to as determined by the user's permissions. With $search=AllowedChildren the API will return the entity info of all entities that can be added as children of the requested entity. With $search=ParentAndFirstLevelChildren the API will return the parent and first level of children that the user has either direct access to or indirect access via one of their descendants. With $search=ParentOnly the API will return only the group if the user has access to at least one of the descendants of the group. With $search=ChildrenOnly the API will return only the first level of children of the group entity info specified in $filter. The user must have direct access to the children entities or one of it's descendants for it to show up in the results. Known values are: "AllowedParents", "AllowedChildren", "ParentAndFirstLevelChildren", "ParentOnly", and "ChildrenOnly". Default value is None.
$selectstringThis parameter specifies the fields to include in the response. Can include any combination of Name,DisplayName,Type,ParentDisplayNameChain,ParentChain, e.g. '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'. When specified the $select parameter can override select in $skipToken. Default value is None.
$skipintegerNumber of entities to skip over when retrieving results. Passing this in will override $skipToken. Default value is None.
$skiptokenstringPage continuation token is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a token parameter that specifies a starting point to use for subsequent calls. Default value is None.
$topintegerNumber of elements to return when retrieving results. Passing this in will override $skipToken. Default value is None.
$viewstringThe view parameter allows clients to filter the type of data that is returned by the getEntities call. Known values are: "FullHierarchy", "GroupsOnly", "SubscriptionsOnly", and "Audit". Default value is None.
Cache-ControlstringIndicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. Default value is "no-cache".
groupNamestringA filter which allows the get entities call to focus on a particular group (i.e. "$filter=name eq 'groupName'"). Default value is None.

SELECT examples

List all entities (Management Groups, Subscriptions, etc.) for the authenticated user.

SELECT
id,
name,
displayName,
inheritedPermissions,
numberOfChildGroups,
numberOfChildren,
numberOfDescendants,
parent,
parentDisplayNameChain,
parentNameChain,
permissions,
tenantId,
type
FROM azure.management_groups.entities
WHERE $skiptoken = '{{ $skiptoken }}'
AND $skip = '{{ $skip }}'
AND $top = '{{ $top }}'
AND $select = '{{ $select }}'
AND $search = '{{ $search }}'
AND $filter = '{{ $filter }}'
AND $view = '{{ $view }}'
AND groupName = '{{ groupName }}'
AND Cache-Control = '{{ Cache-Control }}'
;