Skip to content

Commit

Permalink
Merge branch 'Dev' into fix/credential-export
Browse files Browse the repository at this point in the history
  • Loading branch information
FabienTschanz committed Feb 17, 2025
2 parents 3992f3f + 8f0b3a5 commit bbe3ff5
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 21 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,17 @@
* Adds the possibility to allow variables in strings and no authentication
results update during conversion to final export.
FIXES [#3861](https://github.com/microsoft/Microsoft365DSC/issues/3861)
* SCSensitivityLabel
* Fixes invalid accepted content type values.
* TeamsAppPermissionPolicy
* Updated correct Typecasting for AppPresetMeeting and PinnedMessagebarApps before adding them to the policy
FIXES [[#5752](https://github.com/microsoft/Microsoft365DSC/issues/5752)
* TeamsAppSetupPolicy
* FIXES [[#5752](https://github.com/microsoft/Microsoft365DSC/issues/5752)
* TeamsM365App
* Remove `Ensure` property from being exported.
FIXES [#5781](https://github.com/microsoft/Microsoft365DSC/issues/5781)
* DEPENDENCIES
* Updated ReverseDSC to version 2.0.0.27

# 1.25.212.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function Get-TargetResource
$ApplyWaterMarkingText,

[Parameter()]
[ValidateSet('File, Email', 'Site, UnifiedGroup', 'PurviewAssets', 'Teamwork', 'SchematizedData')]
[ValidateSet('File', 'Email', 'Site', 'UnifiedGroup', 'PurviewAssets', 'Teamwork', 'SchematizedData')]
[System.String[]]
$ContentType,

Expand Down Expand Up @@ -401,14 +401,6 @@ function Get-TargetResource
$currentContentType = @()
switch -Regex ($label.ContentType)
{
'File, Email'
{
$currentContentType += 'File, Email'
}
'Site, UnifiedGroup'
{
$currentContentType += 'Site, UnifiedGroup'
}
'PurviewAssets'
{
$currentContentType += 'PurviewAssets'
Expand All @@ -421,6 +413,22 @@ function Get-TargetResource
{
$currentContentType += 'SchematizedData'
}
'File'
{
$currentContentType += 'File'
}
'Email'
{
$currentContentType += 'Email'
}
'Site'
{
$currentContentType += 'Site'
}
'UnifiedGroup'
{
$currentContentType += 'UnifiedGroup'
}
}

# Encryption
Expand Down Expand Up @@ -809,7 +817,7 @@ function Set-TargetResource
$ApplyWaterMarkingText,

[Parameter()]
[ValidateSet('File, Email', 'Site, UnifiedGroup', 'PurviewAssets', 'Teamwork', 'SchematizedData')]
[ValidateSet('File', 'Email', 'Site', 'UnifiedGroup', 'PurviewAssets', 'Teamwork', 'SchematizedData')]
[System.String[]]
$ContentType,

Expand Down Expand Up @@ -1348,7 +1356,7 @@ function Test-TargetResource
$ApplyWaterMarkingText,

[Parameter()]
[ValidateSet('File, Email', 'Site, UnifiedGroup', 'PurviewAssets', 'Teamwork', 'SchematizedData')]
[ValidateSet('File', 'Email', 'Site', 'UnifiedGroup', 'PurviewAssets', 'Teamwork', 'SchematizedData')]
[System.String[]]
$ContentType,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class MSFT_SCSensitivityLabel : OMI_BaseResource
[Write, Description("The ApplyWaterMarkingFontSize parameter specifies the font size (in points) of the watermark text.")] SInt32 ApplyWaterMarkingFontSize;
[Write, Description("The ApplyWaterMarkingAlignment parameter specifies the watermark alignment."), ValueMap{"Horizontal","Diagonal"}, Values{"Horizontal","Diagonal"}] String ApplyWaterMarkingLayout;
[Write, Description("The ApplyWaterMarkingText parameter specifies the watermark text. If the value contains spaces, enclose the value in quotation marks.")] String ApplyWaterMarkingText;
[Write, Description("The ContentType parameter specifies where the sensitivity label can be applied."), ValueMap{"File, Email","Site, UnifiedGroup","PurviewAssets","Teamwork","SchematizedData"}, Values{"File, Email","Site, UnifiedGroup","PurviewAssets","Teamwork","SchematizedData"}] String ContentType[];
[Write, Description("The ContentType parameter specifies where the sensitivity label can be applied."), ValueMap{"File", "Email","Site", "UnifiedGroup","PurviewAssets","Teamwork","SchematizedData"}, Values{"File", "Email","Site", "UnifiedGroup","PurviewAssets","Teamwork","SchematizedData"}] String ContentType[];
[Write, Description("The EncryptionContentExpiredOnDateInDaysOrNever parameter specifies when the encrypted content expires. Valid values are integer or never.")] String EncryptionContentExpiredOnDateInDaysOrNever;
[Write, Description("The EncryptionDoNotForward parameter specifies whether the Do Not Forward template is applied.")] Boolean EncryptionDoNotForward;
[Write, Description("The EncryptionEncryptOnly parameter specifies whether the encrypt-only template is applied.")] Boolean EncryptionEncryptOnly;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ function Get-TargetResource
#endregion

$nullResult = $PSBoundParameters
$nullResult.Ensure = 'Absent'
try
{
if ($null -ne $Script:exportedInstances -and $Script:ExportMode)
Expand Down Expand Up @@ -112,7 +111,6 @@ function Get-TargetResource
AssignmentType = $instance.AvailableTo.AssignmentType
Users = $usersValue
Groups = $groupsValue
Ensure = 'Present'
Credential = $Credential
ApplicationId = $ApplicationId
TenantId = $TenantId
Expand Down Expand Up @@ -199,7 +197,6 @@ function Set-TargetResource

$currentInstance = Get-TargetResource @PSBoundParameters

$PSBoundParameters.Remove('Ensure') | Out-Null
$PSBoundParameters.Remove('Credential') | Out-Null
$PSBoundParameters.Remove('ApplicationId') | Out-Null
$PSBoundParameters.Remove('ApplicationSecret') | Out-Null
Expand Down
2 changes: 1 addition & 1 deletion Modules/Microsoft365DSC/Dependencies/Manifest.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
},
@{
ModuleName = 'ReverseDSC'
RequiredVersion = '2.0.0.25'
RequiredVersion = '2.0.0.27'
}
)
}
5 changes: 2 additions & 3 deletions Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,8 @@ function Get-M365DSCDRGComplexTypeToString
{
$currentProperty = @()
$IndentLevel++
for ($i = 0; $i -lt $ComplexObject.Count; $i++)
foreach ($item in $ComplexObject)
{
$item = $ComplexObject[$i]
$splat = @{
'ComplexObject' = $item
'CIMInstanceName' = $CIMInstanceName
Expand Down Expand Up @@ -387,7 +386,7 @@ function Get-M365DSCDRGComplexTypeToString
if ($ComplexObject.$key.Count -gt 0)
{
$currentProperty += $indent + $key + ' = '
$currentProperty += "@("
$currentProperty += '@('
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
| **ApplyWaterMarkingFontSize** | Write | SInt32 | The ApplyWaterMarkingFontSize parameter specifies the font size (in points) of the watermark text. | |
| **ApplyWaterMarkingLayout** | Write | String | The ApplyWaterMarkingAlignment parameter specifies the watermark alignment. | `Horizontal`, `Diagonal` |
| **ApplyWaterMarkingText** | Write | String | The ApplyWaterMarkingText parameter specifies the watermark text. If the value contains spaces, enclose the value in quotation marks. | |
| **ContentType** | Write | StringArray[] | The ContentType parameter specifies where the sensitivity label can be applied. | `File, Email`, `Site, UnifiedGroup`, `PurviewAssets`, `Teamwork`, `SchematizedData` |
| **ContentType** | Write | StringArray[] | The ContentType parameter specifies where the sensitivity label can be applied. | `File`, `Email`, `Site`, `UnifiedGroup`, `PurviewAssets`, `Teamwork`, `SchematizedData` |
| **EncryptionContentExpiredOnDateInDaysOrNever** | Write | String | The EncryptionContentExpiredOnDateInDaysOrNever parameter specifies when the encrypted content expires. Valid values are integer or never. | |
| **EncryptionDoNotForward** | Write | Boolean | The EncryptionDoNotForward parameter specifies whether the Do Not Forward template is applied. | |
| **EncryptionEncryptOnly** | Write | Boolean | The EncryptionEncryptOnly parameter specifies whether the encrypt-only template is applied. | |
Expand Down

0 comments on commit bbe3ff5

Please sign in to comment.