Sunday, June 19, 2016

Cross-premises free/busy calendar sharing between Exchange on-premises and Exchange Online organizations


You federate Exchange Server 2010+ on-premises and Exchange Online for calendar sharing. This specific use case is for two organizations to share Free/Busy calendar information between each other. The first organization has an Exchange Server 2010+ on premises environment. The second organization uses Office 365 with Exchange Online. Neither organization is configured for Hybrid.


From Exchange Server 2010+ on premises EMS:

1. Create Federation Trust:

$ski = [System.Guid]::NewGuid().ToString("N")
New-ExchangeCertificate -FriendlyName "Exchange Federated Delegation" -DomainName $env:USERDNSDOMAIN -Services Federation -KeySize 2048 -PrivateKeyExportable $true -SubjectKeyIdentifier $ski
Get-ExchangeCertificate | ?{$_.friendlyname -eq "Exchange Federated Delegation"} | New-FederationTrust -Name "Microsoft Federation Gateway"

2. Create the federated domain proof encryption string for calendar sharing domain "":

Get-FederatedDomainProof -DomainName

3. Add domain proof as TXT record (generated in step 2) to "" public DNS domain and TXT record value is something like:


4. Once TXT record is added to public DNS then add domain "" as a federated domain and enable federation for the Exchange organization:

Set-FederatedOrganizationIdentifier -DelegationFederationTrust "Microsoft Federation Gateway" -AccountNamespace "" -Enabled $true

5. Create an organization relationship with "" Exchange Online domain:

Get-FederationInformation -DomainName "" | New-OrganizationRelationship -Name "On-premises to Exchange Online" -DomainNames "" -FreeBusyAccessEnabled $true -FreeBusyAccessLevel AvailabilityOnly

From Exchange Online

1. Connect to EXO in another PowerShell session or with "prefixed" session:

Import-PSSession (New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential (Get-Credential) -Authentication Basic -AllowRedirection)

2. Create a new organization relationship with Exchange Server on premises domain "":

Get-FederationInformation -DomainName "" | New-OrganizationRelationship -Name "Exchange Online to on-premises" -DomainNames "" -FreeBusyAccessEnabled $true -FreeBusyAccessLevel AvailabilityOnly

Now it’s time for testing.

You may notice office 365 users are not able to see the on-prem calendar free/busy info immediately while it's working from the other end. In this case you may need to restart IIS (iisreset) of on-premises Exchange Server 2010+ CAS to get this working. Alternative solution (without IIS restart) you may find at: Exchange Online users in Office 365 cannot see on-premises Exchange Server Free/Busy information.


1 comment: