Coder Social home page Coder Social logo

stf-fts / office-addin-taskpane-sso Goto Github PK

View Code? Open in Web Editor NEW

This project forked from officedev/office-addin-taskpane-sso

0.0 0.0 0.0 3.98 MB

Project template for creating an Office taskpane add-in that uses SSO,

License: Other

JavaScript 21.19% TypeScript 63.31% CSS 3.93% HTML 11.57%

office-addin-taskpane-sso's Introduction

Office-Addin-TaskPane-SSO

This repository contains the source code used by the Yo Office generator when you create a new Office Add-in that appears in the task pane. You can also use this repository as a sample to base your own project from if you choose not to use the generator.

TypeScript

This template is written using TypeScript. For the JavaScript version of this template, go to Office-Addin-TaskPane-SSO-JS.

Instructions

  • Run the following command to configure single-sign on for your add-in project:
    $ npm run configure-sso
  • A web browser window will open and prompt you to sign in to Azure. Sign in to Azure using your Microsoft 365 administrator credentials. These credentials will be used to register a new application in Azure and configure the settings required by SSO.

  • Run the following command to build the project, start the local web server, and sideload your add-in in the previously selected Office client application

    $ npm start
> [!NOTE]
> Office Add-ins should use HTTPS, not HTTP, even when you are developing. If you are prompted to install a certificate after you run the following command, accept the prompt to install the certificate that the Yeoman generator provide.
  • In the Office client application that opens when you run the previous command (i.e., Excel, Word or PowerPoint), make sure that you're signed in with a user that's a member of the same Microsoft 365 organization as the Microsoft 365 administrator account that you used to connect to Azure while configuring SSO in step 3 of the previous section. Doing so establishes the appropriate conditions for SSO to succeed.

  • In the Office client application, choose the Home tab, and then choose the Show Task Pane button in the ribbon to open the add-in task pane. The following image shows this button in Excel.

    Example of task pane ribbon button in an Excel worksheet

  • At the bottom of the task pane, choose the Get My User Profile Information button to initiate the SSO process.

    If a dialog window appears to request permissions on behalf of the add-in, this means that SSO is not supported for your scenario and the add-in has instead fallen back to an alternate method of user authentication. This may occur when the tenant administrator hasn't granted consent for the add-in to access Microsoft Graph, or when the user isn't signed into Office with a valid Microsoft account or Microsoft 365 Education or Work account. Choose the Accept button in the dialog window to continue.

  • The add-in retrieves profile information for the signed-in user and writes it to the document.

    Example of profile information written to an Excel worksheet

Debugging

This template supports debugging using any of the following techniques:

Questions and comments

We'd love to get your feedback about this sample. You can send your feedback to us in the Issues section of this repository.

Questions about Office Add-ins development in general should be posted to Microsoft Q&A. If your question is about the Office JavaScript APIs, make sure it's tagged with [office-js-dev].

Join the Microsoft 365 Developer Program

Get a free sandbox, tools, and other resources you need to build solutions for the Microsoft 365 platform.

Additional resources

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Copyright

Copyright (c) 2021 Microsoft Corporation. All rights reserved.

office-addin-taskpane-sso's People

Contributors

millerds avatar igor-ribeiiro avatar akrantz avatar tcourtneyowen avatar dependabot[bot] avatar lindalu-msft avatar microsoftopensource avatar donaldgu avatar davidchesnut avatar msftgits avatar quanfuxiao avatar elizabethsamuel-msft avatar dubbs avatar kbrandl avatar rick-kirkham avatar nokafor avatar

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.