Skip to content

Commit

Permalink
Merge pull request #3408 from NikCharlebois/Fixes-#3179
Browse files Browse the repository at this point in the history
Fixes #3179
  • Loading branch information
NikCharlebois committed Jun 22, 2023
2 parents 091d217 + dacb6ef commit 7757234
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
* Added support for the PlannerAllowCalendarSharing property for Planner.
* Added support for the Microsoft 365 installation options.
* Added support for the Viva Insights and Briefing email settings.
* PPTenantIsolationSettings & PPTenantSettings
* Handles the case where required permissions are not provided when using SPN authentication.
FIXES [#3179](https://github.com/microsoft/Microsoft365DSC/issues/3179)
* SCProtectionAlert
* Prevents extracting system rules.
FIXES [#3224](https://github.com/microsoft/Microsoft365DSC/issues/3224)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ function Get-TargetResource
try
{
$tenantIsolationPolicy = Get-PowerAppTenantIsolationPolicy -TenantId $tenantid
if ($tenantIsolationPolicy.StatusCode -eq 403)
{
throw "Invalid permission for the application. If you are using a custom app registration to authenticate, make sure it is defined as a Power Platform admin management application. For additional information refer to https://learn.microsoft.com/en-us/power-platform/admin/powershell-create-service-principal#registering-an-admin-management-application"
}

[Array]$allowedTenants = $tenantIsolationPolicy.properties.allowedTenants | ForEach-Object {
$directions = $_.direction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,11 @@ function Export-TargetResource
try
{
$settings = Get-TenantSettings -ErrorAction Stop

if ($settings.StatusCode -eq 403)
{
throw "Invalid permission for the application. If you are using a custom app registration to authenticate, make sure it is defined as a Power Platform admin management application. For additional information refer to https://learn.microsoft.com/en-us/power-platform/admin/powershell-create-service-principal#registering-an-admin-management-application"
}
$dscContent = ''

$Params = @{
Expand Down

0 comments on commit 7757234

Please sign in to comment.