Open KarinaxRivera opened 2 weeks ago
Could you please share a screenshot of the assigned API permissions for your application and the assigned roles? Thanks.
Could you please share a screenshot of the assigned API permissions for your application and the assigned roles? Thanks.
The app registration only has the Global Reader role and is a Power Platform admin management application.
Please check if you did assign:
OrganizationSettings.Read or if you need write access as well:
OrganizationSettings.ReadWrite
I did not see this API permission within the screenshot.
I do not see that permission listed in my Azure portal. I also checked which permissions the application would need using Get-M365DSCCompiledPermissionList and that API permission doesn't appear.
Could this be a problem with how my app registration was created?
Please check if you did assign:
OrganizationSettings.Read or if you need write access as well:
OrganizationSettings.ReadWrite
I did not see this API permission within the screenshot.
Is this a permission that I need to assign via PowerShell and not GUI?
You could add the permission by using Graph PowerShell or the EntraId Admin Center.
Using Graph PowerShell you need to add the scope parameter to Connect-MGGraph with one of the scopes above.
Within EntraID you could update your app registration in the section api permissions.
@andikrueger PP workload app doesn't require any API permissions, it just needs to be added to Power Apps as a mgmt app by an admin.
"Service principal applications are treated within Power Platform similar to how normal users are with the Power Platform Administrator role assigned. Granular roles and permissions can't be assigned to limit their capabilities. The application doesn't get any special role assigned in Microsoft Entra ID, as this is how platform services treat requests made by service principals."
That is absolutely correct.
I was referring to the Exchange error message.
Oh right, I didn't even see that resource there, O365 workload and specially O365OrgSettings is really a pain in the neck...
The log shows that it's failing on line 294 which corresponds for calling Get-DefaultTenantMyAnalyticsFeatureConfig
, this requires either Global admin, EXO admin or Insights admin Entra roles as per https://learn.microsoft.com/en-us/powershell/module/exchange/get-defaulttenantmyanalyticsfeatureconfig?view=exchange-ps
In my case I've assigned Insights administrator since it's the most restrictive, please bear in mind that assigning any one of these Entra roles is required even if only reading is required.
After adding the Exchange Admin role, the error was fixed but generated new teams errors. Is there any specific roles/permissions needed to export the component TeamsM365App? The error I got was below:
{NotSpecified}
Microsoft.Teams.PowerShell.TeamsCmdlets.ErrorHandling.ApiException
at Microsoft.Teams.PowerShell.TeamsCmdlets.Utils.HttpUtilities.Get[T](HttpClient httpClient, Uri requestUri, Dictionary`2 headers)
at Microsoft.Teams.PowerShell.TeamsCmdlets.GetUnifiedApps.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
"Error during Export:"
at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.619.1\DSCResources\MSFT_TeamsM365App\MSFT_TeamsM365App.psm1: line 438
at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.619.1\Modules\M365DSCReverse.psm1: line 682
at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.619.1\Modules\M365DSCUtil.psm1: line 1377
at
I have been getting the below error messages when exporting PPTenantIsolationSettings and OrgSettings. For PowerPlatform, I have already completed adding the application as a service principal in PowerPlatform. For both workloads, I am authenticating using a certificate.
Microsoft 365 DSC Version
1.24.619.1
Which workloads are affected
Office 365 Admin, Power Platform
The DSC configuration
No response
Verbose logs showing the problem
Environment Information + PowerShell Version
No response