0

I'm having a problem with a web add-in for Outlook.

The Outlook client is 2016 (MSI) which I believe means that it supports no higher than JavaScript API 1.4, opposed to Outlook 2016 (C2R) which, as I recall it, supports JavaScript API 1.6 or maybe even higher.

Anyway, I'm trying to use the method Office.context.mailbox.getCallbackTokenAsync(asyncResult) which has previously worked just fine on the server where it is used, but now it has stopped working for some odd reason.

The asyncResult is now empty or rather the token is empty.

{"value":"","status":"succeeded"}

How can the token be empty all of the sudden when this add-in used to work perfectly? According to the admin of the server, it has received Windows updates on the date that this stopped working for both Office and Outlook specifically.

The Outlook clients connect to an Exchange 2013 (CU7 December 9, 2014 : 15.0.1044.25) which has also received some updates.

Both servers have been rebooted since then, but nothing has changed. The token remains empty.

Can anyone shed some light on what could be the cause of this if anyone knows that is, because all I can really do myself at this point is guess?

UPDATE 1

I have now been given permission to install Fiddler and I have found the request and respond regarding the attempt to retrieve the token. Can any of you who know the Exchange server inside out see what is going on here, because I don't see any reasoning as to what is failing, except that the response message indicates that the request is faulty somehow (which hasn't been changed for more then a year at least).

Here is the request (some names have been replaced with something generic).

REQUEST

POST https://<domain>/ews/Exchange.asmx HTTP/1.1
Cache-Control: no-cache
Connection: Keep-Alive
Pragma: no-cache
Content-Type: text/xml; charset=utf-8
User-Agent: Microsoft Office/16.0 (Windows NT 6.3; Microsoft Outlook 16.0.4849; Pro)
X-User-Identity: <account>@<domain>.com
Depth: 0
Content-Length: 801
Host: <host>
Authorization: Negotiate TlRMTVNTUAADAAAAGAAYAJ4AAABCAUIBtgAAAAAAAABYAAAANAA0AFgAAAASABIAjAAAABAAEAD4AQAAFYKI4gYDgCUAAAAPGSbYTqZVeCx7cnQxM336pnMAeQBzAHQAZQBtAGMAbwBuAG4AZQBjAHQAQABlAHMAdABpAGMAaABlAG0ALgBjAG8AbQBFAFMAVABJAC0AQwBUAFgAMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAT6dTWGCCv/rRor0Srrxd9AQEAAAAAAADJcWWYQo7VATtznMo8smALAAAAAAIACABFAFMAVABJAAEAFABFAFMAVABJAC0ARQBYAEMASAAxAAQAFABFAFMAVABJAC4AbABvAGMAYQBsAAMAKgBFAFMAVABJAC0ARQBYAEMASAAxAC4ARQBTAFQASQAuAGwAbwBjAGEAbAAFABQARQBTAFQASQAuAGwAbwBjAGEAbAAHAAgAyXFlmEKO1QEGAAQAAgAAAAgAMAAwAAAAAAAAAAAAAAAAIAAA77CK35CNnSd54Hy6NnToh6W3Oxa6tsihxlCrQ8jwDWMKABAARs+Rq8MKQZq+cmQJ8nL9/gkALABIAFQAVABQAC8AbQBhAGkAbAAuAGUAcwB0AGkAYwBoAGUAbQAuAGMAbwBtAAAAAAAAAAAAeHckPR2HOLOW0y2ri7TR1A==
Cookie: OutlookSession="{994C5944-A93C-4830-9E6F-605881790815}"; ClientId=PRHSVIWKYUDISQLQPQ


            <?xml version="1.0"?>
            <q:Envelope
                xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types"
                xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages"
                xmlns:q="http://schemas.xmlsoap.org/soap/envelope/">
                <q:Header>
                    <ex12t:RequestServerVersion Version="Exchange2012"></ex12t:RequestServerVersion>
                </q:Header>
                <q:Body>
                    <ex12m:GetClientAccessToken>
                        <ex12m:TokenRequests>
                            <ex12t:TokenRequest>
                                <ex12t:Id>214c1212-e3ff-45eb-9218-2deb35d6b8b9</ex12t:Id>
                                <ex12t:TokenType>ScopedToken</ex12t:TokenType>
                                <ex12t:Scope>ParentItemId:AAMkADRiMzkyMjhmLWQ1NGItNDY0Mi04Nzk0LWYyNzMzZWQ2ZGE5MABGAAAAAAApHj7qoKF1QY4+pcwfu7uCBwCHPrayw2+bT5ByF4j5Y8QZAAAAAAEMAACHPrayw2+bT5ByF4j5Y8QZAAAAAAFxAAA=</ex12t:Scope>
                            </ex12t:TokenRequest>
                        </ex12m:TokenRequests>
                    </ex12m:GetClientAccessToken>
                </q:Body>
            </q:Envelope>

RESPONSE (some names have been replaced with something generic).

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/8.5
request-id: 1a7cbf79-8ba3-4a73-bfa2-1733d841b2b1
X-CalculatedBETarget: <server>.local
X-DiagInfo: <server>
X-BEServer: <server>
X-AspNet-Version: 4.0.30319
Set-Cookie: exchangecookie=2cd797c5290345a7861dfe60e16ecc12; expires=Thu, 29-Oct-2020 10:21:15 GMT; path=/; HttpOnly
Set-Cookie: X-BackEndCookie=S-1-5-21-2060358956-2462126529-2132206371-1263=u56Lnp2ejJqBmpzHns+cypzSncaZzdLLmprH0p3HxsvSm5yaycuazMieys/MgYHNz87G0s7O0s3Hq87Pxc3Oxc7K; expires=Thu, 28-Nov-2019 09:21:15 GMT; path=/ews; secure; HttpOnly
Persistent-Auth: true
X-Powered-By: ASP.NET
X-FEServer: <server>
Date: Tue, 29 Oct 2019 10:21:15 GMT
Content-Length: 1148


<?xml version="1.0" encoding="utf-8"?>
<s:Envelope
    xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Header>
        <h:ServerVersionInfo MajorVersion="15" MinorVersion="0" MajorBuildNumber="1044" MinorBuildNumber="21" Version="V2_22"
            xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types"
            xmlns="http://schemas.microsoft.com/exchange/services/2006/types"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
        </s:Header>
        <s:Body
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <m:GetClientAccessTokenResponse
                xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
                xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
                <m:ResponseMessages>
                    <m:GetClientAccessTokenResponseMessage ResponseClass="Error">
                        <m:MessageText>The token for this extension could not be retrieved.</m:MessageText>
                        <m:ResponseCode>ErrorInvalidClientAccessTokenRequest</m:ResponseCode>
                        <m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
                    </m:GetClientAccessTokenResponseMessage>
                </m:ResponseMessages>
            </m:GetClientAccessTokenResponse>
        </s:Body>
    </s:Envelope>
Aidal
  • 799
  • 4
  • 8
  • 33
  • You can verify whether the Exchange server is returning an error by looking for a GetClientAccessToken EWS request from Outlook in a fiddler trace on the client machine. The error will indicate what is failing. For Exchange 2013, CU7 is an old update, as you pointed out, so you may also want to update to the latest. The latest update is CU23, which is currently the only update supported by Microsoft. – Outlook Add-ins Team - MSFT Oct 24 '19 at 20:23
  • I have updated my post (UPDATE 1) with the request and response regarding the token. Please can any of you can see what the problem is? – Aidal Oct 29 '19 at 10:57
  • Come on guys, someone must know what is going on here and why the server produces this type of error. The code requesting the token hasn't been changed for a very long time - it just stopped working. See UPDATE 1 in the post for Fiddler outputs. – Aidal Oct 30 '19 at 07:32
  • Exchange 2013 CU7 is an ancient build. Can you upgrade to CU23 since we don't support CU7 anymore? – Outlook Add-ins Team - MSFT Nov 05 '19 at 23:40
  • I know they tried to do that but it failed. They moved on to Office365 now and the problem isn't there anymore. I would still love to know what this error was, since it doesn't really say in the message. – Aidal Nov 06 '19 at 13:30
  • Thanks for adding the additional information. One cause of this error is an expired certificate on the Exchange server (see [this question](https://stackoverflow.com/questions/56061449/microsoft-web-addins-office-context-mailbox-getcallbacktokenasync-returns-resp) for more information including resolution steps). I'm wondering whether that certificate is also refreshed when applying an Exchange update, so the older update of Exchange may be an indirect cause of the error. – Outlook Add-ins Team - MSFT Nov 11 '19 at 22:03

0 Answers0