Skip to content

Commit

Permalink
Merge branch 'Dev' into fix4081
Browse files Browse the repository at this point in the history
  • Loading branch information
NikCharlebois authored Feb 7, 2024
2 parents d52aa67 + 12888d7 commit 86e8bb6
Show file tree
Hide file tree
Showing 25 changed files with 1,035 additions and 148 deletions.
29 changes: 27 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
* IntuneDeviceEnrollmentPlatformRestriction
* Added Priority parameter
FIXES [#4081](https://github.com/microsoft/Microsoft365DSC/issues/4081)
* TeamsMeetingPolicy
* Ignore the AllowUserToJoinExternalMeeting parameterfor drift evaluation
since it doesn't do anything based on official documentation.
* DEPENDENCIES
* Updated Microsoft.PowerApps.Administration.PowerShell to version 2.0.180.
* Updated MSCloudLoginAssistant to version 1.1.11
* Updated ReverseDSC to version 2.0.0.19

# 1.24.131.2

Expand Down Expand Up @@ -33,9 +40,27 @@
wasn't properly returned.
* EXOSafeLinksPolicy
* Deprecated the UseTranslatedNotificationText property
* IntuneDeviceConfigurationPolicyAndroidOpenSourceProject,
IntuneExploitProtectionPolicyWindows10SettingCatalog, IntuneRoleAssignment,
IntuneRoleDefinition, IntuneSettingCatalogASRRulesPolicyWindows10,
IntuneWiFiConfigurationPolicyAndroidDeviceAdministrator,
IntuneWifiConfigurationPolicyAndroidEnterpriseDeviceOwner,
IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile,
IntuneWifiConfigurationPolicyAndroidForWork,
IntuneWifiConfigurationPolicyAndroidOpenSourceProject,
IntuneWifiConfigurationPolicyIOS, IntuneWifiConfigurationPolicyMacOS,
IntuneWifiConfigurationPolicyWindows10, TeamsCallParkPolicy
* Fix condition in Test-TargetResource when resource is absent
FIXES [#3897](https://github.com/microsoft/Microsoft365DSC/issues/3897)
FIXES [#4256](https://github.com/microsoft/Microsoft365DSC/issues/4256)
* TeamsFilesPolicy
* Add default value ('Present') to parameter Ensure
* TeamsEmergencyCallRoutingPolicy
* Fix deletion of resource
FIXES [#4261](https://github.com/microsoft/Microsoft365DSC/issues/4261)
* TeamsUserCallingSettings
* Added support for Certificate Authentication
FIXES [#3180](https://github.com/microsoft/Microsoft365DSC/issues/3180)
* TEAMS
* Added support for ManagedIdentity Authentication across Teams resources.
* DEPENDENCIES
Expand Down Expand Up @@ -64,7 +89,7 @@
* Remove the logic path to create a new instance in favor of the update flow.
* AADConditionalAccessPolicy
* Fix issue when not all parameters are specified
FIXES [[#4202](https://github.com/microsoft/Microsoft365DSC/issues/4202)]
FIXES [#4202](https://github.com/microsoft/Microsoft365DSC/issues/4202)
* AADCrossTenantAccessPolicy
* Removed the ability to specify a value of Absent for the Ensure property.
* AADCrossTenantAccessPolicyCOnfigurationDefault
Expand All @@ -83,7 +108,7 @@
* DEPRECATED Resource.
* SCAutoSensitivityLabelRule
* Correct export indentation, which caused an issue with report conversion to JSON.
FIXES [[#4240](https://github.com/microsoft/Microsoft365DSC/issues/4240)]
FIXES [#4240](https://github.com/microsoft/Microsoft365DSC/issues/4240)
* SPOSharingSettings
* Fixed an Issue where the MySiteSharingCapability could be returned as an
empty string instead of a null value from the Get method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -eq 'Absent')
if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ function Test-TargetResource
$ValuesToCheck.Remove('ApplicationSecret') | Out-Null
$ValuesToCheck.Remove('Identity') | Out-Null

if ($CurrentValues.Ensure -eq 'Absent')
if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
{
Write-Verbose -Message 'The policy was not found'
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ function Test-TargetResource
}
$PSBoundParameters.Set_Item('ResourceScopes', $ResourceScopes)

if ($CurrentValues.Ensure -eq 'Absent')
if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ function Test-TargetResource

$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -eq 'Absent')
if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ function Test-TargetResource
$ValuesToCheck.Remove('TenantId') | Out-Null
$ValuesToCheck.Remove('ApplicationSecret') | Out-Null

if ($CurrentValues.Ensure -eq 'Absent')
if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
{
Write-Verbose -Message 'The policy was not found'
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -eq 'Absent')
if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -eq 'Absent')
if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -eq 'Absent')
if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -eq 'Absent')
if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -eq 'Absent')
if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -eq 'Absent')
if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -eq 'Absent')
if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -eq 'Absent')
if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ function Test-TargetResource
$ValuesToCheck = ([Hashtable]$PSBoundParameters).Clone()

$ValuesToCheck.Remove('Identity') | Out-Null
if ($CurrentValues.Ensure -eq 'Absent')
if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function Get-TargetResource
[Parameter()]
[ValidateSet('Present', 'Absent')]
[System.String]
$Ensure,
$Ensure = 'Present',

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -117,7 +117,7 @@ function Set-TargetResource
[Parameter()]
[ValidateSet('Present', 'Absent')]
[System.String]
$Ensure,
$Ensure = 'Present',

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -234,7 +234,7 @@ function Test-TargetResource
[Parameter()]
[ValidateSet('Present', 'Absent')]
[System.String]
$Ensure,
$Ensure = 'Present',

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,9 @@ function Test-TargetResource
# The AllowIPVideo is temporarly not working, therefore we won't check the value.
$ValuesToCheck.Remove('AllowIPVideo') | Out-Null

# The AllowUserToJoinExternalMeeting doesn't do anything based on official documentation
$ValuesToCheck.Remove('AllowUserToJoinExternalMeeting') | Out-Null

$TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues `
-Source $($MyInvocation.MyCommand.Source) `
-DesiredValues $PSBoundParameters `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,25 @@ function Get-TargetResource
[System.String]
$Ensure = 'Present',

[Parameter(Mandatory = $true)]
[Parameter()]
[System.Management.Automation.PSCredential]
$Credential
$Credential,

[Parameter()]
[System.String]
$ApplicationId,

[Parameter()]
[System.String]
$TenantId,

[Parameter()]
[System.String]
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

Write-Verbose -Message "Getting the Teams Calling Policy $($Identity)"
Expand Down Expand Up @@ -111,6 +127,10 @@ function Get-TargetResource
ForwardingTarget = $instance.ForwardingTarget
Ensure = 'Present'
Credential = $Credential
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
ManagedIdentity = $ManagedIdentity.IsPresent
}
}
catch
Expand Down Expand Up @@ -187,9 +207,25 @@ function Set-TargetResource
[System.String]
$Ensure = 'Present',

[Parameter(Mandatory = $true)]
[Parameter()]
[System.Management.Automation.PSCredential]
$Credential
$Credential,

[Parameter()]
[System.String]
$ApplicationId,

[Parameter()]
[System.String]
$TenantId,

[Parameter()]
[System.String]
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)

Write-Verbose -Message 'Setting Teams User Calling Settings'
Expand Down Expand Up @@ -297,9 +333,25 @@ function Test-TargetResource
[System.String]
$Ensure = 'Present',

[Parameter(Mandatory = $true)]
[Parameter()]
[System.Management.Automation.PSCredential]
$Credential
$Credential,

[Parameter()]
[System.String]
$ApplicationId,

[Parameter()]
[System.String]
$TenantId,

[Parameter()]
[System.String]
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)
#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down Expand Up @@ -339,9 +391,25 @@ function Export-TargetResource
[OutputType([System.String])]
param
(
[Parameter(Mandatory = $true)]
[Parameter()]
[System.Management.Automation.PSCredential]
$Credential
$Credential,

[Parameter()]
[System.String]
$ApplicationId,

[Parameter()]
[System.String]
$TenantId,

[Parameter()]
[System.String]
$CertificateThumbprint,

[Parameter()]
[Switch]
$ManagedIdentity
)
$ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' `
-InboundParameters $PSBoundParameters
Expand Down Expand Up @@ -371,9 +439,13 @@ function Export-TargetResource
{
Write-Host " |---[$i/$($allUsers.Length)] $($user.UserPrincipalName)" -NoNewline
$params = @{
Identity = $user.UserPrincipalName
Ensure = 'Present'
Credential = $Credential
Identity = $user.UserPrincipalName
Ensure = 'Present'
Credential = $Credential
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
ManagedIdentity = $ManagedIdentity.IsPresent
}
$Results = Get-TargetResource @Params

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ class MSFT_TeamsUserCallingSettings : OMI_BaseResource
[Write, Description("The forwarding target type. Supported values are Voicemail, SingleTarget, MyDelegates and Group. Voicemail is only supported for Immediate forwarding."), ValueMap{"Group","MyDelegates","SingleTarget","Voicemail"}, Values{"Group","MyDelegates","SingleTarget","Voicemail"}] String ForwardingTargetType;
[Write, Description("The forwarding target. Supported types of values are ObjectId's, SIP addresses and phone numbers. For phone numbers we support the following types of formats: E.164 (+12065551234 or +1206555000;ext=1234) or non-E.164 like 1234.")] String ForwardingTarget;
[Write, Description("Present ensures the policy exists, absent ensures it is removed."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
[Required, Description("Credentials of the Teams Global Admin."), EmbeddedInstance("MSFT_Credential")] String Credential;
[Write, Description("Credentials of the Teams Global Admin."), EmbeddedInstance("MSFT_Credential")] String Credential;
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
[Write, Description("Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com")] String TenantId;
[Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint;
[Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity;
};
Loading

0 comments on commit 86e8bb6

Please sign in to comment.