Coder Social home page Coder Social logo

Comments (25)

yalcinborlu20 avatar yalcinborlu20 commented on August 10, 2024 1

Thank you @ajays-msft . I'm closing the ticket

from office-js.

msiint avatar msiint commented on August 10, 2024 1

@ajays-msft The add-in is also using the makeEwsRequestAsync API with the request

"<?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
      <soap:Header>
        <t:RequestServerVersion Version="Exchange2013" />
      </soap:Header>
      <soap:Body>
        <GetItem
          xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
          xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
          <ItemShape>
            <t:BaseShape>IdOnly</t:BaseShape>
            <t:AdditionalProperties>
          <t:FieldURI FieldURI="item:Subject" />
          <t:FieldURI FieldURI="item:Body" />
          <t:FieldURI FieldURI="message:ToRecipients" />
          <t:FieldURI FieldURI="message:CcRecipients" />
          <t:FieldURI FieldURI="message:BccRecipients" />
          <t:FieldURI FieldURI="item:InternetMessageHeaders" />
        </t:AdditionalProperties>
          </ItemShape>
          <ItemIds>
            <t:ItemId Id=#{itemId} />
          </ItemIds>
        </GetItem>
      </soap:Body>
    </soap:Envelope>"

and failing with the same generic error response:

OSF.DDA.AsyncResult
{
    "status": "failed",
    "error": {
        "name": "GenericResponseError",
        "message": "An internal error has occurred.",
        "code": 9020
    }
}

I just noticed that during this request, the GetClientAccessToken is failing in the network console so I was thinking that this might be causing the makeEwsRequestAsync call to fail.

Any ideas why the GetClientAccessToken would be failing? Perhaps this is also failing for the OP. I see other service calls such as https://outlook.live.com/owa/0/service.svc?action=CreateItem being successful.

from office-js.

yalcinborlu20 avatar yalcinborlu20 commented on August 10, 2024 1

one more thing @neprasad-microsoft . It was working correctly last month. We have not changed anything. I hope this information helps.

from office-js.

neprasad-microsoft avatar neprasad-microsoft commented on August 10, 2024 1

Thanks for reporting this issue regarding GetClientAccessToken. It has been put on our backlog and we are working on a fix. We unfortunately have no timelines to share at this point.
 
Internal tracking id: Office: [4335835]

from office-js.

ajays-msft avatar ajays-msft commented on August 10, 2024

@yalcinborlu20 -

Can you also please help with additional details like:

  1. Is this working on other Outlook platforms like Desktop Outlook / Mac Outlook?
  2. Are you able to get the ews api return the right value outside the office-js api (makeEwsRequest)? https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/get-started-with-ews-client-applications

from office-js.

yalcinborlu20 avatar yalcinborlu20 commented on August 10, 2024

Hey @ajays-msft
Thank you for your quick response.

  1. It's not working for any platform
  2. I've already tried your suggestion. It returns 500 and giving me no detail. (The remote server returned an error: (500))

from office-js.

ajays-msft avatar ajays-msft commented on August 10, 2024

@yalcinborlu20 - This forum is limited to issues related to office.js. Since this is related to EWS, for effective guidance, please get help from the ews forum as mentioned in the EWS documentation https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/start-using-web-services-in-exchange
https://social.technet.microsoft.com/Forums/en-US/home?forum=exchangesvrdevelopment

from office-js.

yalcinborlu20 avatar yalcinborlu20 commented on August 10, 2024

@ajays-msft I tried one more time with EWSEditor. There is nothing wrong with EWS. It's working. I guess the problem is related to office.js. Here is my ss of request and response. It's the same xml request for web addin
Screenshot 2024-02-13 at 12 34 24

from office-js.

msiint avatar msiint commented on August 10, 2024

I am running into the same issue for an Outlook add-in on both Mac and Outlook web.

I noticed in the console that it was making a request to
https://outlook.live.com/owa/0/service.svc?action=GetClientAccessToken&app=Mail&n=80

with this as the response:

{
    "Header": {
        "ServerVersionInfo": {
            "MajorVersion": 15,
            "MinorVersion": 20,
            "MajorBuildNumber": 7270,
            "MinorBuildNumber": 33,
            "Version": "V2018_01_08"
        }
    },
    "Body": {
        "ResponseMessages": {
            "Items": [
                {
                    "__type": "GetClientAccessTokenResponseMessage:#Exchange",
                    "Token": null,
                    "MessageText": "An internal server error occurred. The operation failed., One or more errors occurred.",
                    "ResponseCode": "ErrorInternalServerError",
                    "ResponseClass": "Error"
                }
            ]
        }
    }
}

I am testing this on a personal Outlook account and the add-in has the ReadWriteMailbox permissions. This was also something that recently stopped working for the add-in.

from office-js.

ajays-msft avatar ajays-msft commented on August 10, 2024

@msiint - Can you please create a separate issue for the problem you are seeing? In your case, getClientAccesToken is failing, and it is outlook.com account.
In @yalcinborlu20 case, there is no report of getClientAccessToken failing, and it is a outlook365.com account.

from office-js.

yalcinborlu20 avatar yalcinborlu20 commented on August 10, 2024

@ajays-msft small chance but I guess it's worth to check. When I first tried to call directly to EWS in c# console app and got 500 error, there were no "ContentLength" and "UserAgent" headers. After I added these two headers to my request, I successfully got response from EWS.

from office-js.

neprasad-microsoft avatar neprasad-microsoft commented on August 10, 2024

@msiint , can you paste the response for GetClientAccessToken?

from office-js.

yalcinborlu20 avatar yalcinborlu20 commented on August 10, 2024

@neprasad-microsoft I've also tried this. It returns 200 OK. Here is the response

{
    "Header": {
        "ServerVersionInfo": {
            "MajorVersion": 15,
            "MinorVersion": 20,
            "MajorBuildNumber": 7270,
            "MinorBuildNumber": 37,
            "Version": "V2018_01_08"
        }
    },
    "Body": {
        "ResponseMessages": {
            "Items": [
                {
                    "__type": "GetClientAccessTokenResponseMessage:#Exchange",
                    "Token": null,
                    "MessageText": "An internal server error occurred. The operation failed., One or more errors occurred.",
                    "ResponseCode": "ErrorInternalServerError",
                    "ResponseClass": "Error"
                }
            ]
        }
    }
}

from office-js.

yalcinborlu20 avatar yalcinborlu20 commented on August 10, 2024

Screenshot 2024-02-14 at 17 52 11

from office-js.

neprasad-microsoft avatar neprasad-microsoft commented on August 10, 2024

Hi @yalcinborlu20, is this also a custom add-in?

from office-js.

yalcinborlu20 avatar yalcinborlu20 commented on August 10, 2024

Hi @yalcinborlu20, is this also a custom add-in?

yes it is.

from office-js.

msiint avatar msiint commented on August 10, 2024

@yalcinborlu20 I am experiencing the same symptoms to where the add-in was working up until recently but no changes have been deployed on our end.

@neprasad-microsoft Here's the response to GetClientAccessToken in my use case, it looks similar to what @yalcinborlu20 posted.

Request URL:
https://outlook.live.com/owa/0/service.svc?action=GetClientAccessToken&app=Mail&n=577
Request Method:
POST
Status Code:
200 OK

Response:
{
    "Header": {
        "ServerVersionInfo": {
            "MajorVersion": 15,
            "MinorVersion": 20,
            "MajorBuildNumber": 7270,
            "MinorBuildNumber": 33,
            "Version": "V2018_01_08"
        }
    },
    "Body": {
        "ResponseMessages": {
            "Items": [
                {
                    "__type": "GetClientAccessTokenResponseMessage:#Exchange",
                    "Token": null,
                    "MessageText": "An internal server error occurred. The operation failed., One or more errors occurred.",
                    "ResponseCode": "ErrorInternalServerError",
                    "ResponseClass": "Error"
                }
            ]
        }
    }
}

Although sometimes, I notice this will be the response body:

{
    "Header": {
        "ServerVersionInfo": {
            "MajorVersion": 15,
            "MinorVersion": 20,
            "MajorBuildNumber": 7270,
            "MinorBuildNumber": 33,
            "Version": "V2018_01_08"
        }
    },
    "Body": {
        "ResponseMessages": {
            "Items": [
                {
                    "__type": "GetClientAccessTokenResponseMessage:#Exchange",
                    "Token": {
                        "Id": *REDACTED*,
                        "TokenType": "CallerIdentity",
                        "TokenValue": *REDACTED*,
                        "TTL": 60
                    },
                    "ResponseCode": "NoError",
                    "ResponseClass": "Success"
                },
                {
                    "__type": "GetClientAccessTokenResponseMessage:#Exchange",
                    "Token": null,
                    "MessageText": "An internal server error occurred. The operation failed., One or more errors occurred.",
                    "ResponseCode": "ErrorInternalServerError",
                    "ResponseClass": "Error"
                }
            ]
        }
    }

Both of these responses causes the makeEwsRequestAsync call to fail with the generic 9020 error.

from office-js.

msiint avatar msiint commented on August 10, 2024

@neprasad-microsoft

Thank you. Is there a non-internal place where we can track the progress of this ticket? Any idea about the root cause?

from office-js.

neprasad-microsoft avatar neprasad-microsoft commented on August 10, 2024

Hi @msiint
Unfortunately, there is no other place where you can track this issue. This GitHub issue will remain open till it is fixed.
We are working on a fix and will share an update here once the fix is available.

from office-js.

ajays-msft avatar ajays-msft commented on August 10, 2024

@yalcinborlu20 and @msiint - By any chance the account you are using, is it a vanity domain?

from office-js.

yalcinborlu20 avatar yalcinborlu20 commented on August 10, 2024

Hi @ajays-msft
I'm using outlook.com domain. If it's necessary I can also give you the email.

from office-js.

benjidotsh avatar benjidotsh commented on August 10, 2024

Just chiming in: we're encountering the same issue with an outlook.com email address. It has been working fine in production for almost a year now, but now it's suddenly not working anymore.

from office-js.

msiint avatar msiint commented on August 10, 2024

@ajays-msft Also using an outlook.com domain personal email address.

from office-js.

ajays-msft avatar ajays-msft commented on August 10, 2024

We are investigating this issue, and will provide an update when available.

from office-js.

ajays-msft avatar ajays-msft commented on August 10, 2024

This issue is now resolved.

from office-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.