I am working on an Outlook Add-In where I want to access the Microsoft Graph API. I am trying to replace the following code:
function getAccesToken(callback) {
Office.context.mailbox.getCallbackTokenAsync({ isRest: true }, callback);
}
With:
function getAccesToken(callback) {
Office.auth.getAccessTokenAsync({ forceConsent: false }, function(result) {
if (result.status === "succeeded") {
callback({ status: "succeeded", value: result.value });
} else {
callback({ status: "failed", error: result.error });
}
});
}
In order to use Office.auth.getAccessTokenAsync, I updated my manifest.xml to include the element as follows:
<VersionOverrides xmlns="; xsi:type="VersionOverridesV1_0">
<Requirements>
<bt:Sets>
<bt:Set Name="Mailbox" MinVersion="1.3" />
</bt:Sets>
</Requirements>
<Hosts>
......
</Hosts>
<Resources>
......
</Resources>
<WebApplicationInfo>
<Id>Your-App-Client-ID</Id>
<Resource>api://Your-App-Client-ID</Resource>
<Scopes>
<Scope>Mail.ReadWrite</Scope>
<Scope>Mail.Send</Scope>
</Scopes>
</WebApplicationInfo>
</VersionOverrides>
Problem: When I try to upload my manifest file, I receive the following error:
Upload failed. Please check the manifest file and try again.
What I've Tried:
- Double-checked that is placed within .
- Verified the Id matches my Azure AD App Registration's Application (client) ID.