Skip to content

Commit

Permalink
Merge pull request #2585 from microsoft/Dev
Browse files Browse the repository at this point in the history
Release 1.22.1123.1
  • Loading branch information
NikCharlebois authored Nov 23, 2022
2 parents e70fcb4 + f6e0e8c commit d093ffe
Show file tree
Hide file tree
Showing 46 changed files with 2,694 additions and 288 deletions.
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# Change log for Microsoft365DSC

# 1.22.1123.1

* IntuneDeviceConfigurationPolicyWindows10
* Fixed issue when creating this resource if property DefenderDetectedMalwareActions was not present, it'd still be created but with errors.
FIXES [#2581](https://github.com/microsoft/Microsoft365DSC/issues/2581)
* AADUser
* Fixed issue with license assignment
FIXES [#2556](https://github.com/microsoft/Microsoft365DSC/issues/2556)
* EXOOrganizationRelationship
* Add 'None' as supported value for MailboxMoveCapability
FIXES [#2570](https://github.com/microsoft/Microsoft365DSC/issues/2570)
* IntuneRoleDefinition
* Initial Release
* Manage Intune Role definition
* IntuneRoleAssignment
* Initial Release
* Manage Intune Role assignment
* O365AdminAuditLogConfig
* Updated settings.json to include permissions.
FIXES [#2517](https://github.com/microsoft/Microsoft365DSC/issues/2517)
* O365OrgCustomizationSetting
* Updated settings.json to include permissions.
FIXES [#2517](https://github.com/microsoft/Microsoft365DSC/issues/2517)
* SCDLPCompliancePolicy
* Fixes an issue where the Exchange Location and Exception where not sent back in a correct format during Export.
FIXES [#2545](https://github.com/microsoft/Microsoft365DSC/issues/2545)
* SCRetentionCompliancePolicy
* Fixes issue with the TeamsChannelLocation and TeamsChatsLocation parameters that were improperly returned by the Get- function.
FIXES [#2472](https://github.com/microsoft/Microsoft365DSC/issues/2472)
* SCRetentionComplianceRule
* Fixes issue with Teams Policy where the RetentionDurationDisplayHint and ExpirationDateOption parameters weren't returned by the Get- function.
FIXES [#2472](https://github.com/microsoft/Microsoft365DSC/issues/2472)
* TeamsFederationConfiguration
* Fixes an issue where the extraction of allowed domain and blocked domain wasn't in the proper format.
FIXES [#2576](https://github.com/microsoft/Microsoft365DSC/issues/2576)
* DEPENDENCIES
* Updated Microsoft.Graph.* to version 1.17.0;
* Updated MSCloudLoginAssistant to version 1.0.98;
* MISC
* Removed Test-M365DSCDependenciesForNewVersions from export functions. This will improve export speed.
* New Parameter `ValidateOnly` for Update-M365DSCDependencies to check if all dependencies are installed.
FIXES [2519](https://github.com/microsoft/Microsoft365DSC/issues/2519)
* Fixed incorrect usage of Write-Information cmdLet
* Fixed typos for permissions in settings.json
FIXES [2553](https://github.com/microsoft/Microsoft365DSC/issues/2553)

# 1.22.1116.1

* AADApplication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1072,14 +1072,12 @@ function Export-TargetResource

try
{

#region resource generator code
[array]$getValue = Get-MgDirectoryAdministrativeUnit -All `
-ErrorAction Stop

#endregion


$i = 1
$dscContent = ''
if ($getValue.Length -eq 0)
Expand Down Expand Up @@ -1110,7 +1108,7 @@ function Export-TargetResource

if ($Results.Members)
{
$complexTypeStringResult = Get-M365DSCDRGComplexTypeToString -ComplexObject $Results.Members -CIMInstanceName MicrosoftGraphdirectoryobject
$complexTypeStringResult = Get-M365DSCDRGComplexTypeToString -ComplexObject $Results.Members -CIMInstanceName MicrosoftGraphIdentity
if ($complexTypeStringResult)
{
$Results.Members = $complexTypeStringResult }
Expand All @@ -1121,7 +1119,7 @@ function Export-TargetResource
}
if ($Results.ScopedRoleMembers)
{
$complexTypeStringResult = Get-M365DSCDRGComplexTypeToString -ComplexObject $Results.ScopedRoleMembers -CIMInstanceName MicrosoftGraphscopedrolemembership
$complexTypeStringResult = Get-M365DSCDRGComplexTypeToString -ComplexObject $Results.ScopedRoleMembers -CIMInstanceName MicrosoftGraphscopedrolemembership
if ($complexTypeStringResult)
{
$Results.ScopedRoleMembers = $complexTypeStringResult }
Expand Down Expand Up @@ -1157,6 +1155,7 @@ function Export-TargetResource
$isCIMArray=$true
}
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName "Members" -isCIMArray:$isCIMArray
$currentDSCBlock = $currentDSCBlock.Replace('}");', '});')
}
if ($Results.ScopedRoleMembers)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"delegated": {
"read": [
{
"name": "AdmninistrativeUnit.Read.All"
"name": "AdministrativeUnit.Read.All"
},
{
"name": "Directory.Read.All"
Expand All @@ -33,7 +33,7 @@
"application": {
"read": [
{
"name": "AdmninistrativeUnit.Read.All"
"name": "AdministrativeUnit.Read.All"
},
{
"name": "Directory.Read.All"
Expand All @@ -47,7 +47,7 @@
],
"update": [
{
"name": "AdmninistrativeUnit.ReadWrite.All"
"name": "AdministrativeUnit.ReadWrite.All"
},
{
"name": "Directory.ReadWrite.All"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,8 @@ function Set-TargetResource
{
$currentLicenses = @()
}
$licenseDifferences = Compare-Object -ReferenceObject $LicenseAssignment -DifferenceObject $currentLicenses
if ($licensesDifferences.Length -gt 0)
[Array]$licenseDifferences = Compare-Object -ReferenceObject $LicenseAssignment -DifferenceObject $currentLicenses
if ($licenseDifferences.Length -gt 0)
{
$licenses = @{AddLicenses = @(); RemoveLicenses = @();}

Expand Down Expand Up @@ -503,10 +503,10 @@ function Set-TargetResource
#region Assign Licenses
try
{
if ($licensesDifferences.Length -gt 0)
if ($licenseDifferences.Length -gt 0)
{
Write-Verbose -Message "Updating License assignments with values: $(Convert-M365DscHashtableToString -Hashtable $licenses)"
Set-MgUserLicense -UserId $user.Id -AddLicenses $licenses.AddLicenses -RemoveLicenses $licenses.RemoveLicenses
Set-MgUserLicense -UserId $user.UserPrincipalName -AddLicenses $licenses.AddLicenses -RemoveLicenses $licenses.RemoveLicenses
}
}
catch
Expand Down Expand Up @@ -544,9 +544,13 @@ function Set-TargetResource
$currentRoles = @()
}

$diffRoles = Compare-Object -ReferenceObject $Roles -DifferenceObject $currentRoles
Write-Verbose -Message "Current Roles: $($currentRoles -join ',')"
Write-Verbose -Message "Desired Roles: $($Roles -join ',')"
[Array]$diffRoles = Compare-Object -ReferenceObject $Roles -DifferenceObject $currentRoles

if ($diffRoles.Length -gt 0)
{
Write-Verbose -Message "Current Roles: $($currentRoles -join ',')"
Write-Verbose -Message "Desired Roles: $($Roles -join ',')"
}

foreach ($roleDifference in $diffRoles)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,88 +401,47 @@ function Set-TargetResource
Add-M365DSCTelemetryEvent -Data $data
#endregion


if ($RecipientFilter)
{
Write-Verbose -Message "You can't use RecipientFilter and precanned filters at the same time. All precanned filters will be ignored."
$NewAddressListParams = @{
Name = $Name
RecipientFilter = $RecipientFilter
Confirm = $false
}
}
else
{
$NewAddressListParams = @{
Name = $Name
ConditionalCompany = $ConditionalCompany
ConditionalCustomAttribute1 = $ConditionalCustomAttribute1
ConditionalCustomAttribute10 = $ConditionalCustomAttribute10
ConditionalCustomAttribute11 = $ConditionalCustomAttribute11
ConditionalCustomAttribute12 = $ConditionalCustomAttribute12
ConditionalCustomAttribute13 = $ConditionalCustomAttribute13
ConditionalCustomAttribute14 = $ConditionalCustomAttribute14
ConditionalCustomAttribute15 = $ConditionalCustomAttribute15
ConditionalCustomAttribute2 = $ConditionalCustomAttribute2
ConditionalCustomAttribute3 = $ConditionalCustomAttribute3
ConditionalCustomAttribute4 = $ConditionalCustomAttribute4
ConditionalCustomAttribute5 = $ConditionalCustomAttribute5
ConditionalCustomAttribute6 = $ConditionalCustomAttribute6
ConditionalCustomAttribute7 = $ConditionalCustomAttribute7
ConditionalCustomAttribute8 = $ConditionalCustomAttribute8
ConditionalCustomAttribute9 = $ConditionalCustomAttribute9
ConditionalDepartment = $ConditionalDepartment
ConditionalStateOrProvince = $ConditionalStateOrProvince
DisplayName = $DisplayName
IncludedRecipients = $IncludedRecipients
Confirm = $false
}
}

if ($RecipientFilter)
{
Write-Verbose -Message "You can't use RecipientFilter and precanned filters at the same time. All precanned filters will be ignored."
$SetAddressListParams = @{
Identity = $Name
Name = $Name
RecipientFilter = $RecipientFilter
Confirm = $false
}
}
else
{
$SetAddressListParams = @{
Identity = $Name
Name = $Name
ConditionalCompany = $ConditionalCompany
ConditionalCustomAttribute1 = $ConditionalCustomAttribute1
ConditionalCustomAttribute10 = $ConditionalCustomAttribute10
ConditionalCustomAttribute11 = $ConditionalCustomAttribute11
ConditionalCustomAttribute12 = $ConditionalCustomAttribute12
ConditionalCustomAttribute13 = $ConditionalCustomAttribute13
ConditionalCustomAttribute14 = $ConditionalCustomAttribute14
ConditionalCustomAttribute15 = $ConditionalCustomAttribute15
ConditionalCustomAttribute2 = $ConditionalCustomAttribute2
ConditionalCustomAttribute3 = $ConditionalCustomAttribute3
ConditionalCustomAttribute4 = $ConditionalCustomAttribute4
ConditionalCustomAttribute5 = $ConditionalCustomAttribute5
ConditionalCustomAttribute6 = $ConditionalCustomAttribute6
ConditionalCustomAttribute7 = $ConditionalCustomAttribute7
ConditionalCustomAttribute8 = $ConditionalCustomAttribute8
ConditionalCustomAttribute9 = $ConditionalCustomAttribute9
ConditionalDepartment = $ConditionalDepartment
ConditionalStateOrProvince = $ConditionalStateOrProvince
DisplayName = $DisplayName
IncludedRecipients = $IncludedRecipients
RecipientFilter = $RecipientFilter
Confirm = $false
}
}

#Address List doesn't exist but it should
if ($Ensure -eq 'Present' -and $currentAddressListConfig.Ensure -eq 'Absent')
{
Write-Verbose -Message "The Address List '$($Name)' does not exist but it should. Creating Address List."

if ($RecipientFilter)
{
Write-Verbose -Message "You can't use RecipientFilter and precanned filters at the same time. All precanned filters will be ignored."
$NewAddressListParams = @{
Name = $Name
RecipientFilter = $RecipientFilter
Confirm = $false
}
}
else
{
$NewAddressListParams = @{
Name = $Name
ConditionalCompany = $ConditionalCompany
ConditionalCustomAttribute1 = $ConditionalCustomAttribute1
ConditionalCustomAttribute10 = $ConditionalCustomAttribute10
ConditionalCustomAttribute11 = $ConditionalCustomAttribute11
ConditionalCustomAttribute12 = $ConditionalCustomAttribute12
ConditionalCustomAttribute13 = $ConditionalCustomAttribute13
ConditionalCustomAttribute14 = $ConditionalCustomAttribute14
ConditionalCustomAttribute15 = $ConditionalCustomAttribute15
ConditionalCustomAttribute2 = $ConditionalCustomAttribute2
ConditionalCustomAttribute3 = $ConditionalCustomAttribute3
ConditionalCustomAttribute4 = $ConditionalCustomAttribute4
ConditionalCustomAttribute5 = $ConditionalCustomAttribute5
ConditionalCustomAttribute6 = $ConditionalCustomAttribute6
ConditionalCustomAttribute7 = $ConditionalCustomAttribute7
ConditionalCustomAttribute8 = $ConditionalCustomAttribute8
ConditionalCustomAttribute9 = $ConditionalCustomAttribute9
ConditionalDepartment = $ConditionalDepartment
ConditionalStateOrProvince = $ConditionalStateOrProvince
DisplayName = $DisplayName
IncludedRecipients = $IncludedRecipients
Confirm = $false
}
}
New-AddressList @NewAddressListParams
}
#Address List exists but shouldn't
Expand All @@ -494,6 +453,45 @@ function Set-TargetResource
elseif ($Ensure -eq 'Present' -and $currentAddressListConfig.Ensure -eq 'Present')
{
Write-Verbose -Message "Address List '$($Name)' already exists. Updating settings"
if ($RecipientFilter)
{
Write-Verbose -Message "You can't use RecipientFilter and precanned filters at the same time. All precanned filters will be ignored."
$SetAddressListParams = @{
Identity = $Name
Name = $Name
RecipientFilter = $RecipientFilter
Confirm = $false
}
}
else
{
$SetAddressListParams = @{
Identity = $Name
Name = $Name
ConditionalCompany = $ConditionalCompany
ConditionalCustomAttribute1 = $ConditionalCustomAttribute1
ConditionalCustomAttribute10 = $ConditionalCustomAttribute10
ConditionalCustomAttribute11 = $ConditionalCustomAttribute11
ConditionalCustomAttribute12 = $ConditionalCustomAttribute12
ConditionalCustomAttribute13 = $ConditionalCustomAttribute13
ConditionalCustomAttribute14 = $ConditionalCustomAttribute14
ConditionalCustomAttribute15 = $ConditionalCustomAttribute15
ConditionalCustomAttribute2 = $ConditionalCustomAttribute2
ConditionalCustomAttribute3 = $ConditionalCustomAttribute3
ConditionalCustomAttribute4 = $ConditionalCustomAttribute4
ConditionalCustomAttribute5 = $ConditionalCustomAttribute5
ConditionalCustomAttribute6 = $ConditionalCustomAttribute6
ConditionalCustomAttribute7 = $ConditionalCustomAttribute7
ConditionalCustomAttribute8 = $ConditionalCustomAttribute8
ConditionalCustomAttribute9 = $ConditionalCustomAttribute9
ConditionalDepartment = $ConditionalDepartment
ConditionalStateOrProvince = $ConditionalStateOrProvince
DisplayName = $DisplayName
IncludedRecipients = $IncludedRecipients
RecipientFilter = $RecipientFilter
Confirm = $false
}
}
Write-Verbose -Message "Setting Address List '$($Name)' with values: $(Convert-M365DscHashtableToString -Hashtable $SetAddressListParams)"
Set-AddressList @SetAddressListParams
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function Get-TargetResource
$MailboxMoveEnabled,

[Parameter()]
[ValidateSet('Inbound', 'Outbound', 'RemoteInbound', 'RemoteOutbound')]
[ValidateSet('Inbound', 'Outbound', 'RemoteInbound', 'RemoteOutbound', 'None')]
[System.String]
$MailboxMoveCapability,

Expand Down Expand Up @@ -305,7 +305,7 @@ function Set-TargetResource
$MailboxMoveEnabled,

[Parameter()]
[ValidateSet('Inbound', 'Outbound', 'RemoteInbound', 'RemoteOutbound')]
[ValidateSet('Inbound', 'Outbound', 'RemoteInbound', 'RemoteOutbound', 'None')]
[System.String]
$MailboxMoveCapability,

Expand Down Expand Up @@ -528,7 +528,7 @@ function Test-TargetResource
$MailboxMoveEnabled,

[Parameter()]
[ValidateSet('Inbound', 'Outbound', 'RemoteInbound', 'RemoteOutbound')]
[ValidateSet('Inbound', 'Outbound', 'RemoteInbound', 'RemoteOutbound', 'None')]
[System.String]
$MailboxMoveCapability,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class MSFT_EXOOrganizationRelationship : OMI_BaseResource
[Write, Description("The FreeBusyAccessLevel parameter specifies the maximum amount of detail returned to the requesting organization. Valid values are: None, AvailabilityOnly or LimitedDetails"), ValueMap{"None","AvailabilityOnly","LimitedDetails"}, Values{"None","AvailabilityOnly","LimitedDetails"}] String FreeBusyAccessLevel;
[Write, Description("The FreeBusyAccessScope parameter specifies a mail-enabled security group in the internal organization that contains users whose free/busy information is accessible by an external organization. You can use any value that uniquely identifies the group.")] String FreeBusyAccessScope;
[Write, Description("The MailboxMoveEnabled parameter specifies whether the organization relationship enables moving mailboxes to or from the external organization.")] Boolean MailboxMoveEnabled;
[Write, Description("The MailboxMoveCapability parameter is used in cross-tenant mailbox migrations."), ValueMap{"Inbound","Outbound","RemoteInbound","RemoteOutbound"}, Values{"Inbound","Outbound","RemoteInbound","RemoteOutbound"}] String MailboxMoveCapability;
[Write, Description("The MailboxMoveCapability parameter is used in cross-tenant mailbox migrations."), ValueMap{"Inbound","Outbound","RemoteInbound","RemoteOutbound","None"}, Values{"Inbound","Outbound","RemoteInbound","RemoteOutbound","None"}] String MailboxMoveCapability;
[Write, Description("The MailboxMovePublishedScopes parameter is used in cross-tenant mailbox migrations to specify the mail-enabled security groups whose members are allowed to migrate.")] String MailboxMovePublishedScopes[];
[Write, Description("The MailTipsAccessEnabled parameter specifies whether MailTips for users in this organization are returned over this organization relationship.")] Boolean MailTipsAccessEnabled;
[Write, Description("The MailTipsAccessLevel parameter specifies the level of MailTips data externally shared over this organization relationship. This parameter can have the following values: All, Limited, None"), ValueMap{"None","All","Limited"}, Values{"None","All","Limited"}] String MailTipsAccessLevel;
Expand Down
Loading

0 comments on commit d093ffe

Please sign in to comment.