Skip to content

Commit

Permalink
Merge pull request #1330 from microsoft/Dev
Browse files Browse the repository at this point in the history
Release 1.21.721.1
  • Loading branch information
NikCharlebois authored Jul 21, 2021
2 parents c7b5520 + d0e3878 commit abc5b5a
Show file tree
Hide file tree
Showing 19 changed files with 1,696 additions and 263 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Change log for Microsoft365DSC

# 1.21.721.1

* AADMSGroup
* Fixed an issue where the Visibility parameter was never properly returned
which always threw a detected drift when used.
* EXOJournalRule
* Initial Release.
* SPOSite
* Fixed the StorageQuotaWarningLevel value returned by the Get-TargetResource
function.

# 1.21.714.1

* EXOHostedContentFilterPolicy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ function Get-TargetResource
Write-Verbose -Message "GroupID was specified"
try
{
$Group = Get-AzureADGroup -ObjectId $Id -ErrorAction Stop
$Group = Get-AzureADMSGroup -ObjectId $Id -ErrorAction Stop
}
catch
{
Write-Verbose -Message "Couldn't get group by ID, trying by name"
$Group = Get-AzureADGroup -Filter "DisplayName eq '$DisplayName'" -ErrorAction Stop
$Group = Get-AzureADMSGroup -Filter "DisplayName eq '$DisplayName'" -ErrorAction Stop
if ($Group.Length -gt 1)
{
throw "Duplicate AzureAD Groups named $DisplayName exist in tenant"
Expand All @@ -111,7 +111,8 @@ function Get-TargetResource
{
Write-Verbose -Message "Id was NOT specified"
## Can retreive multiple AAD Groups since displayname is not unique
$Group = Get-AzureADGroup -Filter "DisplayName eq '$DisplayName'" -ErrorAction Stop
## Get-AzureADMSGroup is required for the visibility param to be returned. Get-AzureADGroup won't work.
$Group = Get-AzureADMSGroup -Filter "DisplayName eq '$DisplayName'" -ErrorAction Stop
if ($Group.Length -gt 1)
{
throw "Duplicate AzureAD Groups named $DisplayName exist in tenant"
Expand Down Expand Up @@ -420,6 +421,7 @@ function Test-TargetResource
$ValuesToCheck = $PSBoundParameters
$ValuesToCheck.Remove('GlobalAdminAccount') | Out-Null
$ValuesToCheck.Remove('Id') | Out-Null
$ValuesToCheck.Remove('GroupTypes') | Out-Null

$TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues `
-Source $($MyInvocation.MyCommand.Source) `
Expand Down
Loading

0 comments on commit abc5b5a

Please sign in to comment.