Code Monkey home page Code Monkey logo

Comments (9)

Rick-Kirkham avatar Rick-Kirkham commented on May 24, 2024

Reassigning to @davidchesnut because this is an auth sample request.

from office-add-in-samples.

elthombre avatar elthombre commented on May 24, 2024

Hi, ideally, an add-in that runs within OWA (Outlook web app), that pushes a dialog whereby an external website is used for auth and, if successful, redirects to the add-in taskpane.

from office-add-in-samples.

KelBowen avatar KelBowen commented on May 24, 2024

@davidchesnut OK to close this issue yet?

from office-add-in-samples.

davidchesnut avatar davidchesnut commented on May 24, 2024

Hi @elthombre I apologize for not getting this answer posted sooner. I thought I had posted awhile back, but I dont see it here, so I must have missed this somehow.
The dialog is based on an archived sample here: https://github.com/OfficeDev/Office-Add-in-Auth0 If you reuse the code just be sure it is up-to-date with latest library versions and security recommendations. We're moving away from these sorts of samples that are more about non-Office technologies such as Auth0 or MSAL which already have their own documentation. For example, MSAL and Microsoft identity have a ton of samples across multiple platforms and scenarios. It makes more sense to reuse those samples, rather than reinvent them all in an Office context. Separate from this issue, the team is working on providing guidance on how you can take those samples and adopt them to Office (through the dialog API).

Hope this helps!
David

from office-add-in-samples.

elthombre avatar elthombre commented on May 24, 2024

@davidchesnut , the problem with those recommendations is that under the circumstances those examples represent, the developer has complete control of the entire application, right? The application is built from scratch and those samples provide guidance for sign-on.

As an Office developer, we do not have control of the pre-existing environment. Meanwhile, the demands placed upon us are to extend and to customize. Sign-on is only one aspect.

from office-add-in-samples.

davidchesnut avatar davidchesnut commented on May 24, 2024

Hi @elthombre, to be clear, when you mention the "pre-existing environment" are you referring to the M365 tenant where your add-in is deployed? As long as the admin consents your add-in should work correctly with the users on that tenant. Most of our guidance is built around using the on-behalf-of (OBO) flow. So I would recommend starting with the samples that indicate they use OBO. For example, Call Microsoft Graph via OBO.

from office-add-in-samples.

elthombre avatar elthombre commented on May 24, 2024

@davidchesnut , no, what I am saying is that these samples related to authentication are segregated from the solution in question. If I'm building a web app or mobile app or desktop app from scratch, etc., I can control the entire experience and have access to the entire project. In MS Office development, one is working within a pre-existing environment where limited aspects may be exposed.

from office-add-in-samples.

davidchesnut avatar davidchesnut commented on May 24, 2024

Ok, so referring to the sandboxed environment of the task pane running in a webview (desktop) or iFrame (online)? That is true that unlike VSTO solutions you'll be more constrained to just working with the Office.js APIs (or browser features.) Auth will continue to work, and you can use SSO so you don't have to sign in the user twice. Is there a specific challenge you are running into with building an Office Add-in?

from office-add-in-samples.

elthombre avatar elthombre commented on May 24, 2024

@davidchesnut - my apologies here, I've been working on something new related to Teams. This thread was originally created over a year-and-a-half ago. What I presently face is different but I will add that the demands of the client at the time of the original post created some constraints that did not align with Microsoft's recommendations / best practices.

from office-add-in-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.