Skip to content

Commit

Permalink
Rework of PR microsoft#2566. Fixes microsoft#2565
Browse files Browse the repository at this point in the history
  • Loading branch information
andikrueger committed Feb 14, 2023
1 parent da22602 commit c08a861
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* MISC
* Updated required permissions of several resources
FIXES [#2866](https://github.com/microsoft/Microsoft365DSC/issues/2866)
* Added filter to Update-M365DSCAzureAdApplication to be more specific.
FIXES [2565](https://github.com/microsoft/Microsoft365DSC/issues/2565)

# 1.23.208.1

Expand All @@ -29,7 +31,7 @@
* Fixed issue where Attachments Uri weren't properly exiting single quotes.
FIXES [#2822](https://github.com/microsoft/Microsoft365DSC/issues/2822)
* PPPowerAppsEnvironment
* Adds support for Developr SKU and fix for Teams SKU
* Adds support for Developer SKU and fix for Teams SKU
FIXES [#2821](https://github.com/microsoft/Microsoft365DSC/issues/2821)
* SCProtectionAlert
* Support for certificate based auth
Expand Down Expand Up @@ -117,7 +119,7 @@
* Refactored to leverage the official cmdlets instead of using the legacy GraphHandlers.
FIXES [#2767](https://github.com/microsoft/Microsoft365DSC/issues/2767)
* Changed Export-TargetResource to call Get-M365DSCExportContentForResource
to simplify/conform + variables for authentation are added correctly
to simplify/conform + variables for authentication are added correctly
FIXES [#2784](https://github.com/microsoft/Microsoft365DSC/issues/2784)
* SCRetentionCompliancePolicy
* Fixes an issue where the SkypeLocation was trying to be converted to a string when it was an array.
Expand Down
10 changes: 7 additions & 3 deletions Modules/Microsoft365DSC/Modules/M365DSCPermissions.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1361,10 +1361,14 @@ function Update-M365DSCAzureAdApplication
$context = Get-AzContext
}

$resourceAppIdMsGraph = '00000003-0000-0000-c000-000000000000'
$resourceAppIdSharePoint = '00000003-0000-0ff1-ce00-000000000000'
$resourceAppIdExchange = '00000002-0000-0ff1-ce00-000000000000'

$allPrincipals = Get-AzADServicePrincipal
$graphSvcprincipal = $allPrincipals | Where-Object -FilterScript { $_.DisplayName -eq 'Microsoft Graph' }
$spSvcprincipal = $allPrincipals | Where-Object -FilterScript { $_.DisplayName -eq 'Office 365 SharePoint Online' }
$exSvcprincipal = $allPrincipals | Where-Object -FilterScript { $_.DisplayName -eq 'Office 365 Exchange Online' }
$graphSvcprincipal = $allPrincipals | Where-Object -FilterScript { $_.AppId -eq $resourceAppIdMsGraph }
$spSvcprincipal = $allPrincipals | Where-Object -FilterScript { $_.AppId -eq $resourceAppIdSharePoint }
$exSvcprincipal = $allPrincipals | Where-Object -FilterScript { $_.AppId -eq $resourceAppIdExchange }

Write-LogEntry ' '
Write-LogEntry 'Checking existance of AD Application'
Expand Down

0 comments on commit c08a861

Please sign in to comment.