Skip to content
No description, website, or topics provided.
JavaScript C# HTML Other
Branch: master
Clone or download
nkramer Merge pull request #6 from microsoftgraph/usingSDK
Convert to using the Graph sdk. Also updated the version of bootstrap.
Latest commit b1ca698 Jul 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README-Localized initial version Nov 7, 2018
project cleanup Jul 24, 2019
.gitignore initial version Nov 7, 2018
CONTRIBUTING.md initial version Nov 7, 2018
LICENSE initial version Nov 7, 2018
README.md App registration in Azure portal and minor edits May 6, 2019
contoso-airlines-teams.sln initial version Nov 7, 2018

README.md

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 opencode@microsoft.com with any additional questions or comments.

Additional resources

Copyright

Copyright (c) 2018 Microsoft. All rights reserved.

You can’t perform that action at this time.