Forum Discussion

nsakthi's avatar
nsakthi
Icon for Microsoft rankMicrosoft
Jan 04, 2024

Extracting tenant settings from Microsoft Fabric using Python and the REST API

Microsoft Fabric is a unified platform that integrates data and services, encompassing data science and data lakes, to enhance your team’s data utilization. Discover how to leverage Fabric’s features like OneLake, Data Factory, Synapse, Data Activator, Power BI, and Microsoft Purview to usher your data into the AI era.

 

To generate a tenant settings report using REST API, you can use the following steps:

  1. Obtain an access token from Microsoft Entra (aka Azure Active Directory) by following this guide: https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow
  2. Use the access token to call the Fabric REST API endpoint for tenant settings: https://learn.microsoft.com/rest/api/fabric/admin/tenants/get-tenant-settings
  3. Parse the JSON response and extract the relevant information for your report.

 

Here’s a sample Python script that can produce a report on Microsoft Fabric (including Power BI) tenant settings using the REST API:

 

Tenant Settings:

 

Download complete code snippetfabric/admin/tenant_settings.py (github)

No RepliesBe the first to reply

Resources