Share via

Programmatically fetch Azure Organization by Subscription Id

Shai Binyamin 1 Reputation point
2022-10-27T08:54:19.903+00:00

Using the Azure Golang ARM SDK, I am able to fetch all resources under a subscription. except for the Azure Organization.

Is there a REST API, or Golang library that allows to programmatically fetch the Azure Organization with which the subscription is associated?
Note that the only parameter I can provide is the Subscription Id.

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments

1 answer

Sort by: Most helpful
  1. Sam Cogan 10,867 Reputation points Microsoft Employee
    2022-10-27T09:10:39.957+00:00

    Subscriptions are associated with Azure Active Directory Tenants, which are visible as the "TenantId" on a subscription when you query the subscription information.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.