Management - Parent Accounts
  • 01 Jun 2026
  • 1 Minute to read
  • Dark
    Light
  • Download PDF

Management - Parent Accounts

  • Dark
    Light
  • Download PDF

Article summary

In a parent account there are some API operations which will allow you to get a holistic view across the child accounts for certain information.

The below script can be used in VS code with REST Client to help execute some of those operations.  It will do the following:

  1. Authenticate with your entra using the App Registration

  2. Get a list of the child accounts

  3. Get a list of the usage for each child account

# ==============================================================
# Authentication Variables
# ==============================================================
@tenantId = [API Authentication - Tenant ID]
@clientId = [API Authentication - Client ID]
@clientSecret = [API Authentication - Client Secret]
@host = portal.turbo360.com

# ==============================================================
# Step 1 - Get Authentication Token
# ==============================================================

# @name getToken
POST https://login.microsoftonline.com/{{tenantId}}/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials
&client_id={{clientId}}
&client_secret={{clientSecret}}
&scope=api://3ff33167-ae34-4bb3-b86d-109c22d28fc8/.default


###

# ==============================================================
# Step 2 - Get the Child Accounts
# ==============================================================

GET https://{{host}}/partner/api/account-management/get-managed-accounts
Accept: */*
Content-Type: application/json-patch+json
Authorization: Bearer {{getToken.response.body.access_token}}

###

# ==============================================================
# Step 3 - Get the Child Accounts Usage
# ==============================================================

GET https://{{host}}/partner/api/account-management/get-accounts-usage
Accept: */*
Content-Type: application/json-patch+json
Authorization: Bearer {{getToken.response.body.access_token}}

###


Was this article helpful?