Forum Discussion
nsakthi
Microsoft
Feb 05, 2024Extracting tenantSettings via REST API from Microsoft Fabric to SharePoint directly using PowerShell
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.
Extracting tenantSettings via REST API from Microsoft Fabric to SharePoint directly using PowerShell/CloudShell.
To generate a tenant settings report using REST API, you can use the following steps:
- 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
- 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
- Authenticate SharePoint Teams Site using Service Principal and Certificate/Thumbprint and stream the REST API response directly to SharePoint file.
- Parse the JSON response and extract the relevant information for your report.
Here’s a sample PowerShell/CloudShell script that can produce a report on Microsoft Fabric (including Power BI) tenant settings using the REST API:
Download complete code snippet: fabric/admin/tenant_settings_SP.ps1 (github)
No RepliesBe the first to reply