Using mgt in Office add-ins - reactjs

Is possible to use Microsoft graph toolkit in Office add-ins?
I'm using React in Office add-in for Outlook.
Are there any examples of this?
Regards

Yes, it is possible. But make sense to use SSO from the add-in to acquire a token. Read more about SSO in Outlook add-ins in the Enable single sign-on (SSO) in an Office Add-in article.

Related

Best way for an Office Add-in to access Microsoft Graph using the credentials from the user's Office sign-on

I am trying to use Graph API in my outlook Addin.
What is the best way for an Office Add-in to get authorized access to Microsoft Graph using the credentials from the user's Office sign-on without needing the user to sign in a second time?
The below link explains the process, but I don't find any examples for the same.
https://learn.microsoft.com/en-us/office/dev/add-ins/develop/authorize-to-microsoft-graph
Any help is appreciated.

Office Add in Authentication Upgrade

I am new to Azure and Office Add in. I want to migrate one of my Office add in authentication mechanism. currently the authentication is implemented using Office-JS-helpers. I want to replace this library with any other alternative. Could anyone share the best way to migrate.
Application : Office Add in (Word and Outlook)
Add in is written using React 16+ version
App hosted on service fabric in azure
Authentication enabled using Azure AD
Note : I am Looking for SSO Authentication mechanism.
The Overview of authentication and authorization in Office Add-ins section in MSDN explains how to build and configure Office Add-ins to successfully implement authentication and authorization. You are interested in the following - Enable single sign-on (SSO) in an Office Add-in.

Implement SSO in windows application/vsto plugins

I have a requirement to implement SSO for desktop applications created using WPF and office plugins developed using VSTO. I have some basic knowledge about SSO that how it works for websites (based on redirection).
I did some research and found that there is no way we can access the WebBrowser control in WPF to get the access token. I need to use the access token to call the rest services created in java and hosted on some URL.
Is there any way to get access token using windows applications.
Also, as per my understanding only Web-Addins support SSO with Azure AD v2.0. Can you guide me to some good links to achieve it? Please let me know if my question makes sense or some additional information is required.
*All clients do not use Azure AD solution.

Enable OAuth 2.0 implicit flow capability for the Azure AD application

I am trying to run the application for my study on using microsoft graph rest api in outlook web add-in. I found this link.They have asked to Enable OAuth 2.0 implicit flow capability for the Azure AD application in the setup instructions. I would appreciate if you can help me with this. Additional links related to using microsoft graph API would be much appreciated. Thank you in advance
In terms of just enabling implicit flow on an Azure AD / Microsoft Graph application, you can do it in the App Registration portal.
After you login, look inside Platforms > Web, and check the Allow Implicit Flow button. If you don't see the Web platform, you can click Add platform and configure the app.

Office Add-In SSO with an AAD v1 app registration

I am developing a office add-in.
This office Add-In is supposed to retrieve the term store from SharePoint.
By following this tutorial:
https://learn.microsoft.com/en-us/office/dev/add-ins/develop/create-sso-office-add-ins-aspnet
I managed to get an access token to be used for Graph api. However the Graph does not expose any way of getting the term store. Is there a way we can generate an access token to be used with SharePoint and maintain the SSO?
It might be possible by registering an Azure AD v1 app but I could not find any documentation describing that.
I have a similar requirement, but in my research I wasn't able to find a good solution for this scenario.
I think it is probably possible to use a provider hosted SharePoint add-in. And then use the Authorization Code flow for obtaining an access token. Since the SharePoint add-in is trusted it will not require user login.
Of course this does mean the add-in needs to be deployed in SharePoint. If your Office add-in is distributed through the store this isn't really a great solution.
Hopefully there are other ways of achieving the same.
You could call SharePoint Online APIs (via REST or CSOM) with Azure Active Directory Apps. To call APIs secured by Azure AD, your app must acquire an access token from Azure Active Directory.
Please first refer to this document for integrating applications with Azure Active Directory. Then use Azure Active Directory Authentication Library (ADAL) to easily authenticate users to cloud or on-premises Active Directory (AD), and obtain access tokens for securing API calls.

Resources