This article is contributed. See the original author and article here.

This blog post is part 3 of the three-part series on Microsoft Teams and on-premises Exchange mailboxes.


 


Microsoft Teams and on-premises mailboxes: Part 1 – How do Teams and Exchange Server interact?


Microsoft Teams and on-premises mailboxes: Part 2 – Teams Calendar App Troubleshooting



In the first part of the series, I presented an overview of how Teams Backend Services and on-premises Exchange organizations interact. The second part of the series describes how the Teams Backend Services find the on-premises Exchange organization via AutoDiscover and what options you have to isolate sources of error when problems arise during this process, and the access to the calendar app.



This blog post covers Calendar Delegates for Teams meetings and the calendar-based presence status.


 


Troubleshooting Microsoft Teams and Calendar Delegates
The Calendar App displays your calendar to plan meetings or live meetings. If you want a delegate to create a Teams meeting on your behalf, the delegate must schedule the meeting in Outlook for desktop if both users have on-premises mailboxes. You can only plan a new Teams meeting if the Microsoft Teams AddIn is available in Outlook.



Another essential prerequisite is that you, as the mailbox manager, grant delegate access with Editor-permissions via the Outlook setup wizard for delegates. Assigning folder permissions on the calendar folder is not sufficient.



Creating a new team meeting by a delegate for a manager mailbox in an on-premises Exchange organization also uses the Exchange Web Services endpoint. Creating a new meeting by a delegate uses the following steps:



  1. The delegate selects the managers’ calendar in Outlook for Desktop and clicks New Team Meeting in the ribbon bar

    New Teams Meeting.png



  2. The Teams AddIn connects to the Teams Backend Services and queries the delegate permissions for the manager mailbox

  3. The Teams Backend Services uses AutoDiscover V2 to acquire EWS URL

  4. The Teams Backend Services establish an OAuth authenticated connection to the /EWS virtual directory of the on-premises Exchange Server

  5. The Teams Backend Services send a GetDelegate SOAP-Request for creating the Teams meeting in the manager mailbox

  6. Exchange Server returns the list of configured mailbox delegates and the corresponding mailbox permissions

  7. The Teams Backend Services sends the Teams meeting information as a response to the Teams Outlook AddIn, which adds the information to the Outlook meeting request

    Microsoft Teams Meeting.png




If you encounter problems creating a new Teams meeting invite as a delegate, you can check the following:



  • Does the Teams Calendar App work as expected for the manager and the delegate?

  • Execute a GetDelegate query using a SOAP client, i.e., SOAPe

    • Again, use Fiddler for additional troubleshooting on the protocol level



  • You receive a Teams error notification

    Permission to Schedule Meetings.png



    • Verify the delegate permission, as direct folder permissions are not sufficient



  • You receive a Teams error notification that a connection to the server is not possibleCant connect to server.png


    • Check the EWS protocol log for the GetDelegate query




    • Check the IIS Frontend and EWS-Proxy logs for Teams Backend connections




    • Check the Exchange Server PartnerApplication-configuration






Another error source for connection issues to Exchange Server endpoints is user agent string filtering. If you use Layer 7 network devices that perform such filtering, configure them for bypass.



In part 2 of this mini-series, you learned the detailed steps for troubleshooting using the Exchange Server log files. Use the same procedures for troubleshooting the calendar delegate issues.


 


Troubleshooting Microsoft Teams and calendar-based Presence Status
Microsoft Teams can update the presence status to “In a meeting” based on calendar information in your mailbox. However, there are limits to this functionality in conjunction with an on-premises Exchange Server mailbox.



The Microsoft Teams client queries the presence status every six minutes from the Teams backend’s Presence Service. An Exchange calendar query can be done in two different modes:



  • Pull-Mode
    Calendar query based on a 1-hour interval

  • Push-Mode
    Subscription-based


The combination of Microsoft Teams with on-premises mailboxes supports Pull-Mode only.
The Presence Service uses the REST protocol when querying calendar information and performs the following steps:



  1. The Teams Backend Services uses AutoDiscover V2 to acquire REST URL

  2. The Teams Backend Services establish an OAuth authenticated connection to the /api virtual directory of the on-premises Exchange Server

  3. The Teams Backend Services try to create a new calendar event subscription
    a. This action fails because a missing RPC endpoint

  4. The Teams Backend Services use a REST request to query calendar information and determine a calendar-based presence status


The options analyzing issues are the same that you have already learned about for AutoDiscover and calendar access:



  • Does the AutoDiscover response contain the correct REST URL, and is the endpoint accessible from the internet?

    • Again, Fiddler is your tool of choice for troubleshooting connection issues on the HTTPS layer



  • If you have not yet installed the Exchange Server December 2020 Cumulative Updates or newer, check the web.config of the Frontend REST virtual directory

    • Add the maxQueryStringLength attribute to the httpRuntime configuration




File path: $exinstallFrontEndHttpProxyrestweb.config
<httpRuntime maxRequestLength=”2097151″ maxUrlLength=”2048″ maxQueryStringLength=”4096″ requestPathInvalidCharacters=”&lt;,>,*,%,,?” requestValidationMode=”2.0″ />


  • Check the IIS Frontend and REST Proxy logs for Teams Backend connections

  • Check the Exchange REST logs for proxied Frontend connections


As with the calendar delegate access, user agent string filters are also sources of error for presence status. If you use Layer 7 network devices to filter access to the REST endpoint, configure them for bypass or remove them from the access path for troubleshooting.


 


Links



Thomas Stensitzki is a leading technology consultant focusing on Microsoft messaging and collaboration technologies and the owner of Granikos GmbH & Co. KG. He is an MVP for Office Apps & Services and an MCT Regional Lead. As a user group organizer, he hosts the Microsoft Teams User Group Berlin and the Exchange User Group DACH.
Twitter: https://twitter.com/stensitzki 
Blog: https://JustCantGetEnough.Granikos.eu 
Teams User Group: https://TeamsUserGroup.berlin 
Exchange User Group: https://exusg.de 



To write your own blog on a topic of interest as a guest blogger in the Microsoft Teams Community, please submit your idea here: https://aka.ms/TeamsCommunityBlogger 

Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.