OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
686 stars 95 forks source link

ExecuteEwsProxy endpoint returns 403 error #4295

Closed yalcinborlu20 closed 7 months ago

yalcinborlu20 commented 7 months ago

Provide required information needed to triage your issue

There is an error at https://outlook.live.com/owa/0/service.svc?action=ExecuteEwsProxy endpoint. Because of this error my custom add-in is not working as I expected.

Your Environment

Expected behavior

I want my add-in to show a popup to user if user wants to report mail item as phishing.

Current behavior

There is currently no popup on screen because there is an error in
https://outlook.live.com/owa/0/service.svc?action=ExecuteEwsProxy endpoint response.

When I check for service calls, as you can see the screen shots below, It's most likely related to ExecuteEwsProxy endpoint. I believe there might be a change in office.js => ews service authentication parts. This part has been broken recently. May be In 1-2 weeks.

Steps to reproduce

  1. Add custom addin(developed by me) for outlook web
  2. Click an email
  3. In the mail content, click menu button (three dot at right top)
  4. Click the custom addin option (like below) image

Provide additional details

Here is the part of my custom addin js file (MessageRead.js)

const itemId = Office.context.mailbox.item.itemId;

const request = '<?xml version="1.0" encoding="utf-8"?>' +
    '<soap:Envelope xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"' +
    '               xmlns:xsd="https://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>' +
    '    <RequestServerVersion Version="Exchange2013" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" soap:mustUnderstand="0" />' +
    '  </soap:Header>' +
    '  <soap:Body>' +
    '    <GetItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">' +
    '      <ItemShape>' +
    '        <t:BaseShape>IdOnly</t:BaseShape>' +
    '        <t:IncludeMimeContent>true</t:IncludeMimeContent>' +
    '        <t:AdditionalProperties>' +
    '            <t:FieldURI FieldURI="item:Subject" />' +
    '            <t:FieldURI FieldURI="item:ParentFolderId" />' +
    '            <t:FieldURI FieldURI="message:ToRecipients" />' +
    '            <t:FieldURI FieldURI="message:CcRecipients" />' +
    '            <t:FieldURI FieldURI="message:BccRecipients" />' +
    '            <t:FieldURI FieldURI="message:Sender" />' +
    '            <t:FieldURI FieldURI="item:DateTimeReceived" />' +
    '            <t:FieldURI FieldURI="item:InternetMessageHeaders" />' +
    '            <t:FieldURI FieldURI="item:Attachments" />' +
    '        </t:AdditionalProperties>' +
    '      </ItemShape>' +
    '      <ItemIds><t:ItemId Id="' + itemId + '"/></ItemIds>' +
    '    </GetItem>' +
    '  </soap:Body>' +
    '</soap:Envelope>';

        Office.context.mailbox.makeEwsRequestAsync(request, function (result) {
            const response = $.parseXML(result.value);
........
}

Here is the SS of request-response the service

Screenshot 2024-03-25 at 18 28 30 Screenshot 2024-03-25 at 18 28 45

rajjha-msft commented 7 months ago

Hey @yalcinborlu20

This forum is limited to supporting office-js apis.

For effective guidance with respect to ews specific queries, 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

microsoft-github-policy-service[bot] commented 7 months ago

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

microsoft-github-policy-service[bot] commented 7 months ago

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.