Git Product home page Git Product logo

contoso-airlines-teams-sample's Introduction

Contoso Airlines sample for Microsoft Teams Graph APIs

This sample demonstrates using the Microsoft Graph APIs for Microsoft teams to automate team lifecycles for Contoso Airlines: every night, they create a new team for each flight they are flying the following day, and after the flight, they archive the team.

Build and run

To run, you'll need to register your application.

  1. Sign into the Azure app registration portal using either your personal or work or school account.

  2. Choose New registration near the top.

  3. Enter a name for the app. Under Supported account types, select Accounts in any organizational directory and personal Microsoft accounts (e.g. Skype, Xbox, Outlook.com).

  4. For Redirect URI (optional), choose Web and then enter http://localhost:55065/.

    The app overview page displays, listing the properties of your app.

  5. Copy the value for Application (client) ID. This is the unique identifier for your app.

  6. Select the Certificated & secrets page. Under Client secrets, choose New client secret.

  7. Enter a label for the client secret and select an expiration period. Select Add.

  8. Copy the value for your new client secret. This is the only time you will be able to see this value.

    You'll use the application ID and secret to configure the sample app in the next section.

  9. Navigate to the Authentication page.

  10. Under Advanced settings, find the Implicit grant section. Check the boxes for Access tokens and ID tokens to enable implicit flow.

    These options enable the hybrid flow. During authentication, this enables the app to receive both sign-in info (the id_token) and artifacts (in this case, an authorization code) that the app can use to obtain an access token.

  11. Choose Save at the top.

  12. Create a file named Web.config.secrets (put it next to Web.config), and add in your application ID and client (app) secret:

<?xml version="1.0" encoding="utf-8"?>
  <appSettings >
    <add key="ida:AppId" value="xxxxx"/>
    <add key="ida:AppSecret" value="xxxxx"/>
  </appSettings>

Code of note

Note: To understand the code for calling the Microsoft Graph API in an ASP.NET MVC app, see Get started with Microsoft Graph in an ASP.NET 4.6 MVC app.

A lot of this code came from the Graph Quickstart for ASP.NET MVC.

Questions and comments

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

Your feedback is important to us. Connect with us on Stack Overflow. Tag your questions with [MicrosoftGraph].

Contributing

If you'd like to contribute to this sample, see CONTRIBUTING.md.

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.

Additional resources

Copyright

Copyright (c) 2018 Microsoft. All rights reserved.

contoso-airlines-teams-sample's People

Contributors

jackson-woods avatar jthake-msft avatar nkramer 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.