makeEwsRequestAsync return error 9020 in Outlook web or menu item is getting null in (classic...

Discussão em 'Angular' iniciado por Rahul Prajapati, Abril 22, 2025.

  1. let mailbox: any = Office.context.mailbox.item;

    let envelope = `
    <?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>
    <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>
    <AdditionalProperties xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
    <FieldURI FieldURI="item:Subject" />'
    </AdditionalProperties>
    </ItemShape>
    <ItemIds>
    <t:ItemId Id="${mailbox?.itemId}" />
    </ItemIds>
    </GetItem>
    </soap:Body>
    </soap:Envelope>`;
    Office.context.mailbox.makeEwsRequestAsync(envelope,function (asyncResult) {
    if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
    console.log("EWS request successful:", asyncResult);
    } else {
    console.error("EWS request failed:", asyncResult.error);
    }
    }
    );


    it is code for getting eml file in makeEwsRequestAsync method in officejs.

    Web View :

    • mail item is not getting instead show error 9020 GenericResponseError. [​IMG] Outlook Classic
    • mail item is getting null value. [​IMG]

    Continue reading...

Compartilhe esta Página