Get List of AD Groups

You can get a list of Azure AD groups available to the service account.

Request

To retrieve a representation of a collection of Azure AD groups, send the HTTP POST request to the /accounts/azure/service/listAdGroups endpoint.

HTTP Request

POST https://<hostname>/api/v2/accounts/azure/service/listAdGroups

Request Headers

The request contains the following headers.

Header

Required

Value

Description

Authorization

Required

Bearer <Access-Token>

Authenticates a client who sends the request to the server. Must contain the access token for the current logon session in the Bearer <Access-Token> format.

Request Body

To get a list  of all Azure AD groups, send the parameters of the ListAdGroupRequestV2 schema in the request body.

Note

To obtain an accessTokenCache, follow the instructions in section Authenticate Service Account .

{

 "azureAuthentication": {

   "authenticatedByCertificate": true,

   "azureEnvironment": "Global",

   "azureAccountPurpose": "Service",

   "accessTokenCache": "string",

   "displayableId": "string",

   "familyName": "string",

   "givenName": "string",

   "identityProvider": "string",

   "tenantId": "string",

   "_links": {

     "additionalProp1": {

       "href": "string"

     },

     "additionalProp2": {

       "href": "string"

     },

     "additionalProp3": {

       "href": "string"

     }

   }

 },

 "queryOptions": {}

}

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns a response code 200 (OK).

Response Headers

The response to this request contains the following headers. The response may also include additional standard HTTP headers.

Header

Value

Description

Content-length

integer

Identifies the length of the response body message, in bytes.

Content-type

  • application/json
  • application/problem+json

Identifies the media type of the response body message.

Response Body

In the response body, Veeam Backup for Microsoft Azure returns a representation of the /accounts/azure/service/listAdgroups collection. The AdGroupListingResultV2 schema is used for the collection representation.

Get List of AD GroupsExample

The following request returns a list of Azure AD groups.

Request:

POST https://51.11.247.127/api/v2/accounts/azure/service/listAdGroups

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

{

  "authenticatedByCertificate": false,

  "azureEnvironment": "Global",

  "azureConnectionType": "Service",

  "accessTokenCache": "AwAAAAEAAACRAWh0dHBzOi8vbG9naW4ud2luZG93cy5uZXQvZjhjZGVmMzEtYTMxZS00YjRhLTkzZTQtNWY1NzFlOTEyNTVhLzo6Omh0dHBzOi8vbWFuYWdlbWVud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VsbCwiUGFzc3dvcmRFeHBpcmVzT24iOm51bGwsIlVuaXF1ZUlkIjoiU1FQVVA1cmNTMWZzQ2pfZkp6VDhqNjdxT1JMcEN0T1BIb1VvYnJJaVhkYyJ9fSwiVXNlckFzc2VydGlvbkhhc2giOm51bGx9",

  "displayableId": "@tech.com",

  "familyName": "Family Name",

  "givenName": "Given Name",

  "identityProvider": "live.com",

  "_links": {"self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/accounts/created/authenticate?azureEnvironment=Global&userCode=D5FZ9PMFB&deviceCode=DAQABAAEAAABeAFzDwllzTYGDLh_qYbH8UbgpZ6jgqSBzulnepV-NgQ5x3BGGZb3K1Y9Z2UBnC9IhgVF3uEF9Ry_pqUI4iAwBnQkJ_lnYsIp7bSb8lfOTgRfa8RLCEzlGgrUZJk31ATJgFe8UiXn7YFPbWdaPSLiLGEYkrfZ5bTQGZjT0dPv1SOEicdD1Vu0PT9Of9W3zSKYgAA&verificationUrl=https%3A%2F%2Fmicrosoft.com%2Fdevicelogin&expiresOn=02%2F04%2F2020%2007%3A35%3A03%20%2B00%3A00&interval=5&message=To%20sign%20in,%20use%20a%20web%20browser%20to%20open%20the%20page%20https%3A%2F%2Fmicrosoft.com%2Fdevicelogin%20and%20enter%20the%20code%20D5FZ9PMFB%20to%20authenticate.&clientId=84b03795-8ddb-261a-bbee-02f9e1bf7b46&resource=https%3A%2F%2Fmanagement.core.windows.net%2F&azureTypeConnection=Repository"}}

}

 

Response:

200

 

Response Body:

{

 "adGroups":[

  {"id":"52f2666c-590e-4922-882c-87d3d6603e32","displayName":"LightHouse"},

  {"id":"e649cd99-539d-46a1-be34-59bf21aa47b5","displayName":"Pay-As-You-Go_subscription"},

  {"id":"2642e494-54d5-4bb0-83f7-12c1f8c8bdaa","displayName":"security"},

  {"id":"2d66c1e3-88c9-4111-a376-c2498fc51ae3","displayName":"LH"},

  {"id":"ddc0ce76-1f63-44e1-945b-de0ccedeb364","displayName":"Veeam.IT.Network"}

 ],

  "userAdPermissions":{

   "userCanSetAdGroup":true,

   "userCanRenewAdApp":true

  }

}

I want to report a typo

There is a misspelling right here:

 

I want to let the Veeam Documentation Team know about that.