Teams Calendar Fails To On-Premises Mailbox

Article Depreciated: Microsoft now auto-hides the Calendar icon in Teams if your on-premises Exchange Server is not reachable via AutoDiscover V2 and at least Exchange Server 2016 CU3 or later. Once you move your mailbox to Exchange Online (or a supported on-premises version), assuming you did not do any of the below, your Calendar icon appears in the left rail shortly after mailbox migration, though I have seen it take six hours and needs a Teams client restart as well

In Microsoft Teams, you have a calendar  (previously called meetings) icon in the main display that shows your diary and meetings etc. – except it does not work if your mailbox is not either in Exchange Online or, if if your mailbox is on-premises, you are not using Exchange Server 2016 CU3 or later.

The reason for this is that the Teams calendar uses AutoDiscover v2, which is only supported by Exchange Server 2016 CU3 and Exchange Online (note that CU3 is not the current version of Exchange Server 2016 and versions later than CU3 also support AutoDiscover v2).

This means that if you have an earlier version of Exchange Server on-premises then the calendar in Teams is not functional. This raises IT support calls as users expect it to be available, and this impacts your deployment of Teams as it appears broken.

So how can we fix this. Well clearly migrating to Exchange Online or installing the 2016 or later version of Exchange Server is the obvious option from the above, but there is another option to work around this issue. The “fix” is to remove the calendar icon from Teams. This does not stop you booking meetings, as you can still do that in Outlook with the Teams add-in or in the Outlook mobile client, where Teams meeting support is rolling out as I write this blog. If I remove the calendar icon, then the source of the errors disappears, but Teams is not really adversely impacted.

So this is what we start with:


And we remove the icon by creating a new App Setup Policy in the Teams Admin centre and then deploying that policy to all your users (with on-premises mailboxes on older versions of Exchange, or those not using Exchange for calendaring). You can easily roll this out as a test, though its about 24 hours for the effect to be seen, and then roll it out in bulk for all your impacted users. We will cover all this below:


1. Creating App Setup Policy

In the Teams Admin centre ( expand Teams Apps > Setup Policies and create a new policy. This policy is based on your current Global policy.

Select the Calendar app and remove it from this new policy. You should see something like this:


Here I have created an app policy called “With OnPrem Mailboxes” and removed the Calendar app from it.

2. Applying App Setup Policy To A Test User

Once you have the policy ready, its time to test it. Policy changes will take 24 hours to apply (so say the docs) and I found on my testing it was 18 hours when I ran through these steps – so this is not quick!

To make sure your changes work, the plan here is to deploy this new policy to a few selected individuals in the Teams admin centre.

Find the first user and click on their name. In the details page you will see the policies applied to the lower left:


Click Edit at the top right of this section and change the App setup policy to your new policy:


And click Save:


You will see your new policy in the list.

Repeat for the rest of your test pool of users using the portal. We will not use the portal for deploying it to all users though, that will take too long!

Next day, these users should see something like this – no calendar:


3. Applying App Setup Policy To All Users

To apply this change to all users once your test users are happy we will use PowerShell, and we will use the Skype for Business Online PowerShell cmdlets (not the Teams PowerShell!).

The following one-line PowerShell, once you have connected to your tenant, is:

Get-CSOnlineUser | ForEach-Object { Grant-CsTeamsAppSetupPolicy -PolicyName "With OnPrem Mailboxes" -Identity $_.WindowsEmailAddress }

This gets all your users and applies a new Teams App Setup Policy to each of them. This works initially with this problem, as we assume all users are affected. If only a subset of your users are on-premises, then do not use this cmdlet to apply the initial change, but use the below to be more selective.

Within 24 hours the Calendar app will disappear from Teams for your users and they will not be phoning the help desk with issues that none of you can easily fix!

4. Applying App Setup Policy To Selected Users

The above cmdlet is a single run – it does not affect later and new users, nor is there a concept of a default policy that you can set as the one each new users gets. So every so often depending upon how often new users start employment you will want to run the below:

Get-CsOnlineUser -Filter { TeamsAppSetupPolicy -ne "With OnPrem Mailboxes" } | Grant-CsTeamsAppSetupPolicy -PolicyName "With OnPrem Mailboxes"

This gets all users where they do not have the selected App Policy already set and sets this just for these users. This is quicker than setting it for all users regardless.

You can use other filters to select users – for example, you could look for users without an on-premises mailbox and then run the ForEach against each of these users instead – this would work in a hybrid deployment.

When you are in a hybrid deployment and you move mailboxes to Exchange Online from on-premises, you will want to set those users just moved back to a policy that includes the calendar app. The same would go for organizations migrating to Exchange Server 2016 with inbound AutoDiscover from Office 365. Here you could use something like importing a CSV file of mailboxes being migrated (the same list you used to build the migration batches in the first place would do) and then run the ForEach for each item on the CSV file.


18 responses to “Teams Calendar Fails To On-Premises Mailbox”

  1. Mike Campbell avatar

    Thanks, Brian, great article that answered a question I was researching today.

  2. Mahmoud Badran avatar
    Mahmoud Badran


  3. Kristof avatar


    We currently have an Exchange 2013 environment with an Exchange 2016 hybrid server.

    If I change my virtual directories to point to the 2016 server and down proxy mail to Exchange 2013, will the calendar work in Teams? (Autodiscover V2 will then be available?)

    Thank you in advance,


    1. Brian Reid avatar

      No – you need to move the mailbox

      1. Sebasian Haehnel avatar
        Sebasian Haehnel

        Why? What is the reason behind this? It is not explained anywhere. I accept that this it necessary but what is the technical detail responsible?

        1. Brian Reid avatar

          AutoDiscover V2 will not return the correct information nor will the authentication Teams uses be proxied to the Exchange Server 2013 machines

  4. Rkast avatar

    Brian, You perhaps know if we switch CAS (autodiscover,ews etc) to Exchange 2016 but mailbox still resides on Exchange 2010 or 2013 of the calendar button well be visible, or do we also need to move mailbox to Exchange 2016?

    1. Brian Reid avatar

      Mailbox needs to move as well.

  5. AllThumbs avatar

    If I have Exchange Server 2016 CU3 (or later) – does it need to be in hybrid configuration in order to allow teams to see claneder information?

    1. Brian Reid avatar

      No it does not need hybrid, but it needs oauth set up and so running hybrid will ensure that, though you can do it manually.

      1. Brian avatar

        Brian, we have a customer that wants to do this, but does not want to enable Hybrid. Do you have any instructions on how to do it manually? Thank you!

        1. Brian Reid avatar

          This has nothing to do with hybrid. This is all to do with where autodiscover (specifically v2) points.

  6. Paul avatar

    How can this users (without the calendar) get a link (URL) for a meeting?

    1. Brian Reid avatar

      Because the meeting was sent to them when they were invited and is in their mailbox calendar

  7. Amit avatar

    we have migrated our some users from exchange 2013 cu21 to exchange online, everything working fine except calendar app in teams for exchange online/on-premise not appearing, check all the policies, app setup policy, teams upgrade – Teams only.

    1. Brian Reid avatar

      As long as you have not do anything in the article about hiding the icon, as Microsoft now do that for you automatically, the Calendar icon should appear within 3 to 6 hours after moving your mailbox to Exchange Online and I’ve seen that a Teams client restart is required. If the Calendar icon does not appear after this time, in the Azure AD portal find the user, licences tab, and click reprocess licences.

  8. Hooda avatar

    Thanks for the article Brian, In my case the EWS is not published but I have a modern hybrid setup in place (Exchange 2016 CU16) , the calendar button appears but the calendar is empty. do you have an idea.

    1. Brian Reid avatar

      The calendar will be accessed over EWS. But you need to check what data is returned to the client from the AutoDiscover v2 request and ensure that these endpoints are reachable and that your hybrid auth, specifically oauth between Exchange Server and Exchange Online is working.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.