Share via

Microsoft Graph API for Add-in

Neha Sevlani 26 Reputation points
2022-12-30T11:05:19.007+00:00

I have built an office Add-in.
My requirement is that we need to reply to an email and draft an Email through my Add-in to the selected conversationId.

For that i need to use Microsoft Graph API as Outlook REST APIs are deprecated.

Can anyone help me in getting token inside my add-in to use microsoft Graph API.

Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. Bhanu Kiran 3,616 Reputation points
    2022-12-30T21:32:56.293+00:00

    Hi @Neha Sevlani ,

    Hope you are doing good.

    I find a sample of building an Office Add-in for Excel that uses the Microsoft Graph API for your reference. It can be used as a reference for your Outlook add-in development

    To obtain the access token for Microsoft Graph, you need to register you application in Azure AD, make sure you provide right roles/permissions so that you can get a token. Using the token you can access a protected resource like Microsoft Graph API. You can get started quickly with the documentation on getting tokens and the tutorial on creating a simple application.

    The SSO authentication method uses the OAuth2 On-Behalf-Of flow provided by Azure Active Directory, which is also an authentication method using Microsoft Graph. It requires that the add-in register in the Application Registration Portal and specify any required Microsoft Graph scopes in its manifest. Here for your reference: https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/authentication

    Hope this helps you.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.