Closed yalcinborlu20 closed 6 months ago
@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
Hey @ajays-msft Thank you for your quick response.
@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
Thank you @ajays-msft . I'm closing the ticket
@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
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.
@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.
@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.
@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.
@msiint , can you paste the response for GetClientAccessToken?
@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"
}
]
}
}
}
Hi @yalcinborlu20, is this also a custom add-in?
Hi @yalcinborlu20, is this also a custom add-in?
yes it is.
one more thing @neprasad-microsoft . It was working correctly last month. We have not changed anything. I hope this information helps.
@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.
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]
@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?
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.
@yalcinborlu20 and @msiint - By any chance the account you are using, is it a vanity domain?
Hi @ajays-msft I'm using outlook.com domain. If it's necessary I can also give you the email.
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.
@ajays-msft Also using an outlook.com domain personal email address.
We are investigating this issue, and will provide an update when available.
This issue is now resolved.
Provide required information needed to triage your issue
I have an add-in for outlook web(outlook.live.com). Even though I have the correct xml and settings, makeEwsRequestAsync returns error (9020 GenericResponse). I'm trying to get detail of an email item (GetItem)
Your Environment
Expected behavior
Office.context.mailbox.makeEwsRequestAsync() should return the mail item instead of 9020 GenericResponseError.
Current behavior
Steps to reproduce
Provide additional details
Here is the part of my custom addin js file (MessageRead.js)
Here is the ss of debugging. itemId is correct.
Here is the manifest and html files for addin addin-manifest.txt OwaAddIn.txt
Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.