microsoft / Microsoft365DSC

Manages, configures, extracts and monitors Microsoft 365 tenant configurations
https://aka.ms/M365DSC
MIT License
1.61k stars 500 forks source link

Exporting FabricAdminTenantSettings comes out empty #5366

Open MarkLakatos opened 6 days ago

MarkLakatos commented 6 days ago

Hello, I have been working on some Fabric settings i have noticed that in the export page there is no FabricAdminTenantSettings options. Also if i manually put it in the export prompt it comes out empty. Is there any way i can export those and if not, are there plans to add them. Thank you

NikCharlebois commented 1 day ago

FabricAdminTenantSettings requires you to setup DEV access to the Fabric REST APIs:

https://learn.microsoft.com/en-us/rest/api/fabric/articles/get-started/create-entra-app

https://learn.microsoft.com/en-us/rest/api/fabric/articles/identity-support#service-principal-tenant-setting

MarkLaa commented 21 hours ago

Thank you for the answer! I already had an entra app and now i hava changed the principal tenant setting in Power BI. Now i get this error when trying to export with cert thumbprint: {InvalidOperation} System.Net.WebException: The remote server returned the following error: (500) Internal server error. at the following location: Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request) at the following location:Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord() "Error during Export:" at Invoke-M365DSCFabricWebRequest, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.1113.1\Modules\WorkloadHelpers\M365DSCFabricHelper.psm1: line 23 at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.1113.1\DSCResources\MSFT_FabricAdminTenantSettings\MSFT_FabricAdminTenantSettings.psm1: line 1945 at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.1113.1\Modules\M365DSCReverse.psm1: line 682 at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.1113.1\Modules\M365DSCUtil.psm1: line 1460 at , : line 10 TenantId: 8fck2k.onmicrosoft.com I have also given some PowerBI API permissions to the entra app but that did not help. This is the lines in MSFT_FabricAdminTenantSettings that throws the error: $Script:ExportMode = $true $uri = $global:MsCloudLoginConnectionProfile.Fabric.HostUrl + "/v1/admin/tenantsettings" [array] $Script:exportedInstances = Invoke-M365DSCFabricWebRequest -Uri $uri -Method 'GET' <- Appreciate the help!