Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.25.212 #5763

Merged
merged 40 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
aec3b2e
Update authentication properties
Feb 4, 2025
5d62243
Merge branch 'Dev' into fix/auth-properties
FabienTschanz Feb 5, 2025
ceb1e8b
Merge branch 'Dev' into fix/auth-properties
NikCharlebois Feb 6, 2025
aa0a817
Added checks for hardcoded Graph url
NikCharlebois Feb 7, 2025
c2d9ad4
Merge pull request #5735 from NikCharlebois/Fixes-Graph-Endpoints
NikCharlebois Feb 7, 2025
68b31d9
Fix 5741 - Add missing -All flag on get-mggroup to enumerate all groups.
mpoulson Feb 7, 2025
3057867
EXORetentionPolicyTag - Initial Release
NikCharlebois Feb 8, 2025
fc03fac
Fixing Stubs
NikCharlebois Feb 8, 2025
6666d46
Update Microsoft365DSC.PPTenantSettings.Tests.ps1
NikCharlebois Feb 8, 2025
ef1342d
Merge pull request #5744 from NikCharlebois/EXORetentionPolicyTag
NikCharlebois Feb 8, 2025
4caf02e
Updated Resources and Cmdlet documentation pages
NikCharlebois Feb 8, 2025
cfcc76d
Updated Schema Definition
NikCharlebois Feb 8, 2025
20fd0b4
Updated {Create} EXO Integration Tests
NikCharlebois Feb 8, 2025
8d8b83c
Updated {Update} EXO Integration Tests
NikCharlebois Feb 8, 2025
6902c34
Updated {Update} EXO Integration Tests
NikCharlebois Feb 8, 2025
8d62005
Fix export of AAD Cross Tenant Policies with additional cleanup
Feb 11, 2025
a24465a
Fixes
NikCharlebois Feb 11, 2025
91c5e42
Changes logic for PP resources to use REST API
NikCharlebois Feb 11, 2025
e39748a
Updates
NikCharlebois Feb 11, 2025
d139f60
Merge pull request #5751 from NikCharlebois/PPFixes
NikCharlebois Feb 11, 2025
52e7b24
Updated Resources and Cmdlet documentation pages
NikCharlebois Feb 11, 2025
cbdbfa4
Updated Schema Definition
NikCharlebois Feb 11, 2025
437cf9c
AADApplication - Allow for Nullable AuthenticationBehaviors
NikCharlebois Feb 11, 2025
182fd19
Update MSFT_AADApplication.psm1
NikCharlebois Feb 12, 2025
d49bad2
Merge branch 'Dev' into fix/auth-properties
NikCharlebois Feb 12, 2025
21f12ba
Merge pull request #5754 from NikCharlebois/Nullable-AuthenBehavior
NikCharlebois Feb 12, 2025
a264918
Updated Resources and Cmdlet documentation pages
NikCharlebois Feb 12, 2025
6344857
Updated Schema Definition
NikCharlebois Feb 12, 2025
6fc37fc
Merge branch 'Dev' into fix/aad-export
NikCharlebois Feb 12, 2025
732db59
Updated ReverseDSC to Version 2.0.0.25
NikCharlebois Feb 12, 2025
9c09427
Merge pull request #5720 from FabienTschanz/fix/auth-properties
NikCharlebois Feb 12, 2025
e2ca23d
Update M365DSCDRGUtil.psm1
NikCharlebois Feb 12, 2025
9f6403d
Merge pull request #5746 from FabienTschanz/fix/aad-export
NikCharlebois Feb 12, 2025
90a9288
Simplify export of complex properties
Feb 7, 2025
323a27d
Merge pull request #5755 from NikCharlebois/ReverseDSC-Update
NikCharlebois Feb 12, 2025
87f8f91
Merge pull request #5757 from FabienTschanz/feat/update-export
NikCharlebois Feb 12, 2025
a967f6f
Merge pull request #5743 from mpoulson/mpoulson/5741
NikCharlebois Feb 12, 2025
127dbc6
Release 1.25.212.1
NikCharlebois Feb 12, 2025
74856bf
Updated DSCParser
NikCharlebois Feb 12, 2025
0155d91
Merge pull request #5758 from NikCharlebois/Release-1.25.212.1
NikCharlebois Feb 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 34 additions & 0 deletions .github/workflows/Validation Checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Validation Checks
on: [push, pull_request]

jobs:
# This workflow contains a single job called "build"
UnitTests:
# The type of runner that the job will run on
runs-on: windows-latest

permissions: write-all

# Only when run from the main repo
if: github.repository == 'microsoft/Microsoft365DSC'

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repository
uses: actions/checkout@v3

- name: Ensure No Hardcoded Graph Endpoints
shell: pwsh
run: |
$resources = Get-ChildItem './Modules/Microsoft365DSC/DSCResources/*.psm1' -Recurse

foreach ($resource in $resources)
{
$content = Get-Content $resource.FullName -Raw
$foundPosition = $content.IndexOf('https://graph.microsoft.com', 0)
if ($foundPosition -ge 0)
{
throw "Resource {$($Resource.Name)} contains hardcoded Graph references."
}
}
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
# Change log for Microsoft365DSC
# UNRELEASED

* AADGroupEligibilitySchedule
* FIXES [#5741] Missing -All variable which prevented enumeration of more than 100 Groups

# 1.25.212.1

* AADApplication
* Changing the AuthenticationBehaviors parameters to string to allow
for null values.
* AADCrossTenantAccessPolicyConfigurationDefault
* Fixes an issue with CIM class export.
* AADCrossTenantAccessPolicyConfigurationPartner
* Fixes an issue with CIM class export.
FIXES [#5711](https://github.com/microsoft/Microsoft365DSC/issues/5711)
* EXORetentionPolicyTag
* Initial release.
* EXOSmtpDaneInbound
* Updated authentication properties to align with MOF definition.
FIXES [#5709](https://github.com/microsoft/Microsoft365DSC/issues/5709)
* MISC
* PowerPlatform resource revamp to use direct REST API calls.
* Simplify export behavior for all resources and complex objects.
* DEPENDENCIES
* Removed dependency on Microsoft.PowerApps.Administration.PowerShell.
* Updated DSCParser to version 2.0.0.15.
* Updated MSCloudLoginAssistant to version 1.1.37.
* Updated ReverseDSC to version 2.0.0.25.

# 1.25.205.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -823,8 +823,6 @@ function Export-TargetResource

$Script:exportedInstance = $config
$Results = Get-TargetResource @Params
$Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode `
-Results $Results
if ($null -ne $Results.ScopeValue)
{
$complexMapping = @(
Expand Down Expand Up @@ -959,19 +957,8 @@ function Export-TargetResource
-ConnectionMode $ConnectionMode `
-ModulePath $PSScriptRoot `
-Results $Results `
-Credential $Credential
if ($Results.ScopeValue)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'ScopeValue' -IsCIMArray:$False
}
if ($Results.SettingsValue)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'SettingsValue' -IsCIMArray:$False
}
if ($Results.StageSettings)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'StageSettings' -IsCIMArray:$True
}
-Credential $Credential `
-NoEscape @('ScopeValue', 'SettingsValue', 'StageSettings')

$dscContent += $currentDSCBlock
Save-M365DSCPartialExport -Content $currentDSCBlock `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,6 @@ function Export-TargetResource

$Script:exportedInstance = $config
$Results = Get-TargetResource @Params
$Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode `
-Results $Results

$currentDSCBlock = Get-M365DSCExportContentForResource -ResourceName $ResourceName `
-ConnectionMode $ConnectionMode `
-ModulePath $PSScriptRoot `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,6 @@ function Export-TargetResource

$Script:exportedInstance = $config
$Results = Get-TargetResource @Params
$Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode `
-Results $Results

$currentDSCBlock = Get-M365DSCExportContentForResource -ResourceName $ResourceName `
-ConnectionMode $ConnectionMode `
-ModulePath $PSScriptRoot `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,6 @@ function Export-TargetResource

$Script:exportedInstance = $config
$Results = Get-TargetResource @Params
$Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode `
-Results $Results

if ($null -ne $Results.Reviewers)
{
$complexMapping = @(
Expand Down Expand Up @@ -516,11 +513,8 @@ function Export-TargetResource
-ConnectionMode $ConnectionMode `
-ModulePath $PSScriptRoot `
-Results $Results `
-Credential $Credential
if ($Results.Reviewers)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'Reviewers' -IsCIMArray:$True
}
-Credential $Credential `
-NoEscape @('Reviewers')
$dscContent += $currentDSCBlock
Save-M365DSCPartialExport -Content $currentDSCBlock `
-FileName $Global:PartialExportFileName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,6 @@ function Export-TargetResource

$Script:exportedInstance = $config
$Results = Get-TargetResource @Params

if ($null -ne $Results.ScopedRoleMembers)
{
$complexMapping = @(
Expand Down Expand Up @@ -1120,25 +1119,13 @@ function Export-TargetResource
}
}

$Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode `
-Results $Results

$currentDSCBlock = Get-M365DSCExportContentForResource -ResourceName $ResourceName `
-ConnectionMode $ConnectionMode `
-ModulePath $PSScriptRoot `
-Results $Results `
-Credential $Credential

if ($null -ne $Results.ScopedRoleMembers)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'ScopedRoleMembers' -IsCIMArray $true
}
if ($null -ne $Results.Members)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'Members' -IsCIMArray $true
$currentDSCBlock = $currentDSCBlock.Replace("`",`"`r`n", '')
$currentDSCBlock = $currentDSCBlock.Replace(",`r`n", '').Replace("`");`r`n", ");`r`n")
}
-Credential $Credential `
-NoEscape @('Members', 'ScopedRoleMembers')

$dscContent += $currentDSCBlock
Save-M365DSCPartialExport -Content $currentDSCBlock `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,15 @@ function Get-TargetResource
$complexAuthenticationBehaviors = @{}
if ($null -ne $AADBetaApp.authenticationBehaviors.blockAzureADGraphAccess)
{
$complexAuthenticationBehaviors.Add('BlockAzureADGraphAccess', $AADBetaApp.authenticationBehaviors.blockAzureADGraphAccess)
$complexAuthenticationBehaviors.Add('BlockAzureADGraphAccess', $AADBetaApp.authenticationBehaviors.blockAzureADGraphAccess.ToString())
}
if ($null -ne $AADBetaApp.authenticationBehaviors.removeUnverifiedEmailClaim)
{
$complexAuthenticationBehaviors.Add('RemoveUnverifiedEmailClaim', $AADBetaApp.authenticationBehaviors.removeUnverifiedEmailClaim)
$complexAuthenticationBehaviors.Add('RemoveUnverifiedEmailClaim', $AADBetaApp.authenticationBehaviors.removeUnverifiedEmailClaim.ToString())
}
if ($null -ne $AADBetaApp.authenticationBehaviors.requireClientServicePrincipal)
{
$complexAuthenticationBehaviors.Add('RequireClientServicePrincipal', $AADBetaApp.authenticationBehaviors.requireClientServicePrincipal)
$complexAuthenticationBehaviors.Add('RequireClientServicePrincipal', $AADBetaApp.authenticationBehaviors.requireClientServicePrincipal.ToString())
}
if ($complexAuthenticationBehaviors.values.Where({ $null -ne $_ }).Count -eq 0)
{
Expand Down Expand Up @@ -897,10 +897,6 @@ function Set-TargetResource
$tries++
} until ($null -eq $appEntity -or $tries -le 12)
}
Write-Host "Ensure = $Ensure"
Write-Host "ApplicationTemplateId = $ApplicationTemplateId"
Write-Host "skipToUpdate = $skipToUpdate"
Write-Host "currentAADApp.Ensure = $($currentAADApp.Ensure))"
if ($Ensure -eq 'Present' -and $currentAADApp.Ensure -eq 'Absent' -and -not $skipToUpdate)
{
$currentParameters.Remove('ObjectId') | Out-Null
Expand Down Expand Up @@ -1184,8 +1180,8 @@ function Set-TargetResource
requireClientServicePrincipal = $AuthenticationBehaviors.requireClientServicePrincipal
}

Update-MgBetaApplication -ApplicationId $currentAADApp.Id `
-AuthenticationBehaviors $IAuthenticationBehaviors | Out-Null
$uri = (Get-MSCloudLoginConnectionProfile -Workload MicrosoftGraph).ResourceUrl + "beta/applications/$($currentAADApp.Id)/authenticationBehaviors"
Invoke-MgGraphRequest -Uri $uri -Method 'PATCH' -Body $IAuthenticationBehaviors
}

if ($needToUpdateKeyCredentials -and $KeyCredentials)
Expand Down Expand Up @@ -1556,8 +1552,6 @@ function Export-TargetResource
$Results = Get-TargetResource @Params
if ($Results.Ensure -eq 'Present')
{
$Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode `
-Results $Results

if ($Results.Permissions.Count -gt 0)
{
Expand Down Expand Up @@ -1762,49 +1756,8 @@ function Export-TargetResource
-ConnectionMode $ConnectionMode `
-ModulePath $PSScriptRoot `
-Results $Results `
-Credential $Credential

if ($Results.Api)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'Api' -IsCIMArray:$False
}

if ($null -ne $Results.Permissions)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock `
-ParameterName 'Permissions' `
-IsCIMArray:$True
}

if ($Results.OptionalClaims)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'OptionalClaims' -IsCIMArray:$False
}

if ($Results.OnPremisesPublishing)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'OnPremisesPublishing' -IsCIMArray:$False
}

if ($Results.AuthenticationBehaviors)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'AuthenticationBehaviors' -IsCIMArray:$False
}

if ($Results.KeyCredentials)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'KeyCredentials' -IsCIMArray:$True
}

if ($Results.PasswordCredentials)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'PasswordCredentials' -IsCIMArray:$True
}

if ($Results.AppRoles)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'AppRoles' -IsCIMArray:$True
}
-Credential $Credential `
-NoEscape @('Api', 'Permissions', 'OptionalClaims', 'OnPremisesPublishing', 'AuthenticationBehaviors', 'KeyCredentials', 'PasswordCredentials', 'AppRoles')

$dscContent.Append($currentDSCBlock) | Out-Null
Save-M365DSCPartialExport -Content $currentDSCBlock `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ class MSFT_MicrosoftGraphApiApplication
[ClassVersion("1.0.0")]
class MSFT_MicrosoftGraphAuthenticationBehaviors
{
[Write, Description("If false, allows the app to have extended access to Azure AD Graph until June 30, 2025 when Azure AD Graph is fully retired. For more information on Azure AD retirement updates, see June 2024 update on Azure AD Graph API retirement.")] Boolean BlockAzureADGraphAccess;
[Write, Description("If true, removes the email claim from tokens sent to an application when the email address's domain can't be verified.")] Boolean RemoveUnverifiedEmailClaim;
[Write, Description("If true, requires multitenant applications to have a service principal in the resource tenant as part of authorization checks before they're granted access tokens. This property is only modifiable for multitenant resource applications that rely on access from clients without a service principal and had this behavior as set to false by Microsoft. Tenant administrators should respond to security advisories sent through Azure Health Service events and the Microsoft 365 message center.")] Boolean RequireClientServicePrincipal;
[Write, Description("If false, allows the app to have extended access to Azure AD Graph until June 30, 2025 when Azure AD Graph is fully retired. For more information on Azure AD retirement updates, see June 2024 update on Azure AD Graph API retirement.")] String BlockAzureADGraphAccess;
[Write, Description("If true, removes the email claim from tokens sent to an application when the email address's domain can't be verified.")] String RemoveUnverifiedEmailClaim;
[Write, Description("If true, requires multitenant applications to have a service principal in the resource tenant as part of authorization checks before they're granted access tokens. This property is only modifiable for multitenant resource applications that rely on access from clients without a service principal and had this behavior as set to false by Microsoft. Tenant administrators should respond to security advisories sent through Azure Health Service events and the Microsoft 365 message center.")] String RequireClientServicePrincipal;
};

[ClassVersion("1.0.0")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,6 @@ function Export-TargetResource

$Script:exportedInstance = $config
$Results = Get-TargetResource @Params
$Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode `
-Results $Results

$currentDSCBlock = Get-M365DSCExportContentForResource -ResourceName $ResourceName `
-ConnectionMode $ConnectionMode `
-ModulePath $PSScriptRoot `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,6 @@ function Export-TargetResource

$Script:exportedInstance = $config
$Results = Get-TargetResource @Params
$Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode `
-Results $Results

$currentDSCBlock = Get-M365DSCExportContentForResource -ResourceName $ResourceName `
-ConnectionMode $ConnectionMode `
-ModulePath $PSScriptRoot `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,10 @@ function Export-TargetResource
ManagedIdentity = $ManagedIdentity.IsPresent
AccessTokens = $AccessTokens
}
$Results = Get-TargetResource @Params

$Results = Get-TargetResource @Params
if ($Results -is [System.Collections.Hashtable] -and $Results.Count -gt 1)
{
$Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode -Results $Results
$currentDSCBlock = Get-M365DSCExportContentForResource -ResourceName $ResourceName -ConnectionMode $ConnectionMode `
-ModulePath $PSScriptRoot `
-Results $Results `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,6 @@ function Export-TargetResource

$Script:exportedInstance = $config
$Results = Get-TargetResource @Params
$Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode `
-Results $Results
if ($null -ne $Results.RegistrationEnforcement)
{
$complexMapping = @(
Expand Down Expand Up @@ -755,20 +753,9 @@ function Export-TargetResource
-ConnectionMode $ConnectionMode `
-ModulePath $PSScriptRoot `
-Results $Results `
-Credential $Credential
if ($Results.RegistrationEnforcement)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'RegistrationEnforcement' -IsCIMArray:$False
}
if ($Results.SystemCredentialPreferences)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'SystemCredentialPreferences' -IsCIMArray:$False
}
-Credential $Credential `
-NoEscape @('RegistrationEnforcement', 'ReportSuspiciousActivitySettings', 'SystemCredentialPreferences')

if ($Results.ReportSuspiciousActivitySettings)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'ReportSuspiciousActivitySettings' -IsCIMArray:$False
}
$dscContent += $currentDSCBlock
Save-M365DSCPartialExport -Content $currentDSCBlock `
-FileName $Global:PartialExportFileName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,6 @@ function Export-TargetResource

$Script:exportedInstance = $config
$Results = Get-TargetResource @Params
$Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode `
-Results $Results
if ($null -ne $Results.FeatureSettings)
{
$complexMapping = @(
Expand Down Expand Up @@ -1016,19 +1014,9 @@ function Export-TargetResource
-ConnectionMode $ConnectionMode `
-ModulePath $PSScriptRoot `
-Results $Results `
-Credential $Credential
if ($Results.FeatureSettings)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'FeatureSettings' -IsCIMArray:$False
}
if ($Results.ExcludeTargets)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'ExcludeTargets' -IsCIMArray:$True
}
if ($Results.IncludeTargets)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'IncludeTargets' -IsCIMArray:$True
}
-Credential $Credential `
-NoEscape @('FeatureSettings', 'ExcludeTargets', 'IncludeTargets')

$currentDSCBlock = Remove-M365DSCCimInstanceTrailingCharacterFromExport -DSCBlock $currentDSCBlock

# FIX #3645
Expand Down
Loading
Loading