Hi ,
Thanks for reaching out to Microsoft Q&A.
You can use the Azure Lighthouse REST API to determine which of your subscriptions are managed by lighthouse. Specifically, you can query the Delegated Resource Management (DRM) assignments to check which subscriptions have been onboarded.
Steps to Identify Managed Subscriptions via REST API:
- Get the List of Delegated Subscriptions
Use the following REST API to list all delegated subscriptions managed via Azure Lighthouse:
- This API lists all registration assignments (delegated subscriptions) under your management.
- Filter Results for Your Subscriptions
- The response will contain details of delegated subscriptions.
- Look for the properties.managedByTenantId field. If the tenantId of your organization is present there, it means that subscription is being managed by Azure Lighthouse.
- Get Specific Subscription Delegation Details
If you want to check whether a specific subscription is managed by Lighthouse, use:
Replace {subscriptionId} with the actual subscription ID.
- Authentication
Ensure that you authenticate using AAD with an appropriate role (such as Reader or Owner on the managing tenant).
Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.