diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.schema.mof index e7a1374760..504f3b02af 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.schema.mof @@ -7,6 +7,8 @@ class MSFT_EXOAvailabilityAddressSpace : OMI_BaseResource [Write, Description("The Credentials parameter specifies the username and password that's used to access the Availability services in the target forest.")] String Credentials; [Write, Description("The ForestName parameter specifies the SMTP domain name of the target forest for users whose free/busy data must be retrieved. If your users are distributed among multiple SMTP domains in the target forest, run the Add-AvailabilityAddressSpace command once for each SMTP domain.")] String ForestName; [Write, Description("The TargetAutodiscoverEpr parameter specifies the Autodiscover URL of Exchange Web Services for the external organization. Exchange uses Autodiscover to automatically detect the correct server endpoint for external requests.")] String TargetAutodiscoverEpr; + [Write, Description("The TargetServiceEpr parameter specifies the Exchange Online Calendar Service URL of the external Microsoft 365 organization that you're trying to read free/busy information from.")] String TargetServiceEpr; + [Write, Description("The TargetTenantID parameter specifies the tenant ID of the external Microsoft 365 organization that you're trying to read free/busy information from.")] String TargetTenantId; [Write, Description("Specifies if this AvailabilityAddressSpace should exist."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; [Write, Description("Credentials of the Exchange Global Admin"), EmbeddedInstance("MSFT_Credential")] string Credential; [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityConfig/MSFT_EXOAvailabilityConfig.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityConfig/MSFT_EXOAvailabilityConfig.psm1 index f57970c686..a0d4e1ad4f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityConfig/MSFT_EXOAvailabilityConfig.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityConfig/MSFT_EXOAvailabilityConfig.psm1 @@ -84,7 +84,7 @@ function Get-TargetResource } if ($null -eq $AvailabilityConfig) { - Write-Verbose -Message "Availability config for $($OrgWideAccount) does not exist." + Write-Verbose -Message "Availability config for [$($OrgWideAccount)] does not exist." return $nullReturn } $result = @{ @@ -267,10 +267,6 @@ function Test-TargetResource $ValuesToCheck.Remove('ManagedIdentity') | Out-Null $DesiredValues = $PSBoundParameters - if ($OrgWideAccount.Contains('@')) - { - $DesiredValues.OrgWideAccount = $OrgWideAccount.Split('@')[0] - } $TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOAvailabilityAddressSpace/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOAvailabilityAddressSpace/1-Create.ps1 index ab8f6d89fa..388e65eab4 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOAvailabilityAddressSpace/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOAvailabilityAddressSpace/1-Create.ps1 @@ -19,9 +19,10 @@ Configuration Example EXOAvailabilityAddressSpace 'ConfigureAvailabilityAddressSpace' { Identity = 'Contoso.com' - AccessMethod = 'OrgWideFB' + AccessMethod = 'OrgWideFBToken' ForestName = 'example.contoso.com' - TargetAutodiscoverEpr = 'https://contoso.com/autodiscover/autodiscover.xml' + TargetServiceEpr = 'https://contoso.com/autodiscover/autodiscover.xml' + TargetTenantId = 'o365dsc.onmicrosoft.com' Ensure = 'Present' Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOAvailabilityAddressSpace/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOAvailabilityAddressSpace/2-Update.ps1 index 1dcd3fef7a..957581c0cc 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOAvailabilityAddressSpace/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOAvailabilityAddressSpace/2-Update.ps1 @@ -19,9 +19,10 @@ Configuration Example EXOAvailabilityAddressSpace 'ConfigureAvailabilityAddressSpace' { Identity = 'Contoso.com' - AccessMethod = 'OrgWideFBBasic' # Updated Property + AccessMethod = 'OrgWideFBToken' ForestName = 'example.contoso.com' - TargetAutodiscoverEpr = 'https://contoso.com/autodiscover/autodiscover.xml' + TargetServiceEpr = 'https://contoso.com/autodiscover/autodiscover.xml' + TargetTenantId = 'contoso.onmicrosoft.com' # Updated Property Ensure = 'Present' Credential = $Credscredential } diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXODistributionGroup/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXODistributionGroup/1-Create.ps1 index adcbd23b3a..ce9a53e436 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXODistributionGroup/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXODistributionGroup/1-Create.ps1 @@ -31,7 +31,6 @@ Configuration Example ModerationEnabled = $False; Identity = "DemoDG"; Name = "DemoDG"; - OrganizationalUnit = "$Domain"; PrimarySmtpAddress = "demodg@$Domain"; RequireSenderAuthenticationEnabled = $True; SendModerationNotifications = "Always"; diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXODistributionGroup/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXODistributionGroup/2-Update.ps1 index 997f790410..06744f178c 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXODistributionGroup/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXODistributionGroup/2-Update.ps1 @@ -31,7 +31,6 @@ Configuration Example ModerationEnabled = $False; Identity = "DemoDG"; Name = "DemoDG"; - OrganizationalUnit = "$Domain"; PrimarySmtpAddress = "demodg@$Domain"; RequireSenderAuthenticationEnabled = $True; SendModerationNotifications = "Always"; diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOIntraOrganizationConnector/1-Create.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOIntraOrganizationConnector/1-Create.ps1 index f670d356e4..141cb1aa07 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOIntraOrganizationConnector/1-Create.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOIntraOrganizationConnector/1-Create.ps1 @@ -18,7 +18,7 @@ Configuration Example EXOIntraOrganizationConnector 'ConfigureIntraOrganizationConnector' { Identity = "MainCloudConnector" - DiscoveryEndpoint = "https://ExternalDiscovery.Contoso.com" + DiscoveryEndpoint = "https://ExternalDiscovery.Contoso.com/" TargetAddressDomains = "Cloud1.contoso.com","Cloud2.contoso.com" Enabled = $True Ensure = "Present" diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOIntraOrganizationConnector/2-Update.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOIntraOrganizationConnector/2-Update.ps1 index 34b31fcc80..0fc17035db 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/EXOIntraOrganizationConnector/2-Update.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOIntraOrganizationConnector/2-Update.ps1 @@ -18,7 +18,7 @@ Configuration Example EXOIntraOrganizationConnector 'ConfigureIntraOrganizationConnector' { Identity = "MainCloudConnector" - DiscoveryEndpoint = "https://ExternalDiscovery.Contoso.com" + DiscoveryEndpoint = "https://ExternalDiscovery.Contoso.com/" TargetAddressDomains = "Cloud1.contoso.com","Cloud2.contoso.com" Enabled = $False # Updated Property Ensure = "Present"