Note: if you are running CloudGraph locally you can view the interactive, automatically generated documentation in either GraphQL Playground or Altair by clicking the docs button on the right-hand side of the screen. After reading the below information we highly suggest you use one of these tools to test your queries as they will autocomplete fields for you and let you know if your queries are valid before you even submit them.
You can currently query the following attributes and connections on an Azure AD Group
query {
queryazureADGroup{
id
deletedDateTime
classification
createdDateTime
description
displayName
expirationDateTime
groupTypes
isAssignableToRole
mail
mailEnabled
mailNickname
membershipRule
membershipRuleProcessingState
onPremisesDomainName
onPremisesLastSyncDateTime
onPremisesNetBiosName
onPremisesSamAccountName
onPremisesSecurityIdentifier
onPremisesSyncEnabled
preferredDataLocation
preferredLanguage
proxyAddresses
renewedDateTime
securityEnabled
visibility
allowExternalSenders
isSubscribedByMail
isArchived
appRoleAssignments{
id
}
permissionGrants{
id
clientAppId
clientId
permission
permissionType
resourceAppId
}
settings{
id
deletedDateTime
displayName
templateId
values{
id
name
value
}
}
appOwnerOf{
id
}
authRoleAssignments{
id
}
}
}
Get data for a single Azure AD Group key that you know the ID for:
query {
getazureADGroup(id: "12345") {
id
}
}
Get data for all of the AD Groups in a certain classification:
query {
queryazureADGroup(filter: { classification: { eq: "12345" } }) {
id
}
}
Get data for all of the AD Groups that are NOT archived:
query {
queryazureADGroup(filter: { not: { isArchived: true } }) {
id
}
}
Get data for all of the AD Groups that are connected to a authRoleAssignment:
query {
queryazureADGroup(filter: { has: authRoleAssignments }) {
id
}
}
You can order the results you get back either asc or desc depending on your preference:
query {
queryazureADGroup(order: { desc: displayName }) {
id
}
}
Only select and return the first two AD Groups that are found:
query {
queryazureADGroup(first: 2, order: { desc: displayName }) {
id
}
}
Only select and return the first two AD Groups that are found, but offset by one so keys two & three are returned:
query {
queryazureADGroup(first: 2, order: { desc: displayName }, offset: 1) {
id
}
}
Count the number of AD Groups across all scanned Azure subscriptions:
query {
aggregateazureADGroup {
count
}
}
Count the number of AD Groups renewed on the first day of the year. Note that you can apply all of the same filters that are listed above to aggregate queries:
query {
aggregateazureADGroup(filter: { renewedDateTime: { eq: "2022-01-01T00:00:00Z" } }) {
count
}
}
Find all of the AD Groups that have mail enabled across all your accounts:
query {
queryazureADGroup(filter: { mailEnabled: true }) {
id
}
}
Putting it all together; get all data for all AD Groups across all regions for all scanned Azure subscriptions in a single query. For the purposes of this example, we will only get direct children of the keys but if you want to it's easy to go from say, disk -> virtualMachine -> networkInterface ...etc:
query {
queryazureADGroup{
id
deletedDateTime
classification
createdDateTime
description
displayName
expirationDateTime
groupTypes
isAssignableToRole
mail
mailEnabled
mailNickname
membershipRule
membershipRuleProcessingState
onPremisesDomainName
onPremisesLastSyncDateTime
onPremisesNetBiosName
onPremisesSamAccountName
onPremisesSecurityIdentifier
onPremisesSyncEnabled
preferredDataLocation
preferredLanguage
proxyAddresses
renewedDateTime
securityEnabled
visibility
allowExternalSenders
isSubscribedByMail
isArchived
appRoleAssignments{
id
appRoleId
createdDateTime
principalDisplayName
principalId
principalType
resourceDisplayName
resourceId
}
permissionGrants{
id
clientAppId
clientId
permission
permissionType
resourceAppId
}
settings{
id
deletedDateTime
displayName
templateId
values{
id
name
value
}
}
appOwnerOf{
id
region
appId
applicationTemplateId
apiAcceptMappedClaims
apiKnownClientApplications
apiPreAuthorizedApplications
appRoles{
id
allowedMemberTypes
description
displayName
isEnabled
origin
value
}
createdDateTime
description
disabledByMicrosoftStatus
displayName
groupMembershipClaims
identifierUris
isDeviceOnlyAuthSupported
isFallbackPublicClient
notes
oauth2RequirePostResponse
publicClientRedirectUris
publisherDomain
signInAudience
spaApplicationRedirectUris
webAppHomePageUrl
webAppRedirectUris
tags{
id
key
value
}
authRoleAssignments {
id
}
instancedBy {
id
}
ownerGroups {
id
}
ownerServicePrincipals {
id
}
ownerUsers {
id
}
}
authRoleAssignments{
id
name
type
region
subscriptionId
scope
roleDefinitionId
principalId
principalType
canDelegate
applications{
id
}
groups{
id
}
roleDefinition{
id
}
servicePrincipals{
id
}
users{
id
}
}
}
}