none
getAccessTokenAsync return 13005 RRS feed

  • Question

  • I am trying to integrate microsoft graph api into our outlook add-in. I have registered add-in by following below documentation.

    https://docs.microsoft.com/en-us/office/dev/add-ins/develop/register-sso-add-in-aad-v2

    I have updated add-in manifest and added webapplicationinfo based on below documentation.

    https://docs.microsoft.com/en-us/office/dev/add-ins/develop/sso-in-office-add-ins

    The problem is happening when I try to get access token for graph api by using below code.

    Office.context.auth.getAccessTokenAsync(function (result) {
       if (result.status === "succeeded") {
           // Use this token to call Web API
           var ssoToken = result.value;
           ...
       } else {
           if (result.error.code === 13003) {
               // SSO is not supported for domain user accounts, only
               // work or school (Office 365) or Microsoft Account IDs.
           } else {
               // Handle error
           }
       }
    });

    while executing above code, I got screen for granting permission and when I grant all permissions the callback function is getting executed from office.js with failure response.

    {
    code: 13005,
    message: "Missing grant for this add-in.",
    name: "Preauthorization missing."
    }

    My administrator grant all add-in permission by following below documentation.

    https://docs.microsoft.com/en-us/office/dev/add-ins/develop/grant-admin-consent-to-an-add-in

    any ideas?


    Thursday, November 1, 2018 4:19 PM

All replies