title: Trying to get immutable ids via v2.0 REST API
body: <p>I working on an outlook addin ( currently testing in the web ) I need to get some immutable ids so that i can store references to these emails on our platform.  I read this <a href="https://stackoverflow.com/questions/58228796/office-js-outlook-add-in-internetheaders-prefer-immutableid">great response by the Outlook team</a> and have been trying all day to call translateExchangeIds with no success. First off I really couldn't find a doc stating that this endpoint actually existed on the REST v2.0 API.  I can kind of tell it does exist because I get error messages saying that the payload doesn't match what the endpoint says it needs if i just change the capitalization of the json object a little bit.  I'm currently getting an error </p>
  
  <pre><code>code: "ErrorAccessDenied" message: "Access is denied. Check credentials and try again."
  </code></pre>
  
  <p>That seems pretty obvious what I should be doing is checking my permissions.  The docs I can find mention that I need User.ReadBasic.  This really isn't how I would define permissions for an outlook addin though.  In the manifest.xml file for my adding I have defined permissions </p>
  
  <pre><code> &lt;Permissions&gt;ReadWriteMailbox&lt;/Permissions&gt;
  </code></pre>
  
  <p>This should be more than enough to call this endpoint</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const getImmutableId = async () =&gt; new Promise&lt;string&gt;((resolve) =&gt; {
    Office.context.mailbox.getCallbackTokenAsync(
      { isRest: true },
      (result: Office.AsyncResult&lt;string&gt;) =&gt; {
        const headers = new Headers();
        headers.append('Authorization', `Bearer ${result.value}`);
        headers.append('content-type', 'application/json');
        headers.append('data-type', 'json');
        headers.append('process-data', 'false');
        fetch(`${Office.context.mailbox.restUrl}/v2.0/me/translateExchangeIds`, {
          headers,
          method: 'POST',
          body: JSON.stringify({
            InputIds: [
              Office.context.mailbox.item.itemId,
            ],
            SourceIdType: 'ewsId',
            TargetIdType: 'restImmutableEntryId',
          }),
        }).then((response: Response) =&gt; {
          if (response.ok) {
            response.json().then((restResponse: {targetId: string, sourceId: string}[]) =&gt; {
              resolve(restResponse[0].targetId);
            });
          } else {
            // eslint-disable-next-line no-console
            console.warn('there was a failire to get an immutable id falling back to mutable rest id');
            resolve(Office.context.mailbox.convertToRestId(
              Office.context.mailbox.item.itemId, Office.MailboxEnums.RestVersion.v2_0,
            ));
          }
        });
      },
    );
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any help would be greatly appreciated.</p>