No description, website, or topics provided.
Clone or download
Latest commit f9934fc Sep 26, 2018

UWP Graph Controls Sample App

This module will introduce you to working with the Microsoft Graph Controls (AadLogin, ProfileCard, PeoplePicker, SharePointFileList) found in the Windows Community Toolkit in your own UWP application.

Getting Started

The Microsoft Toolkit Graph Controls depend on the MicrosoftGraphService to introduce a layer of abstraction for login authentication. Note that the underlying graph object is the same GraphServiceClient for both the Toolkit and the Graph SDK. For more custom control of graph integration, check out the Microsoft Graph Training Module - Build UWP apps with the Microsoft Graph .NET SDK.

Register the App to use Azure AD v2 Endpoint

  1. Go to the App Registration Portal
  2. Click in the "Add an app" button.
  3. Enter the app name and click "create"
  4. Once the App is created, copy the Application Id to use it later.
  5. Next, add a Platform to the App clicking in "Add Platform" and select "Native Application" tile.
  6. Scroll to the Microsoft Graph Permissions section (by default the User.Read permission is added). Add the following permissions:
    • User.Read
    • User.ReadBasic.All
    • People.Read
    • Files.ReadWrite.All
  7. Finally, save your changes.

Extend the UWP app for Azure AD Authentication

  1. Open the App.xaml file.

  2. Update the ida:ClientID value to the one you copied when registering the Azure AD application.

        <x:String x:Key="ida:ClientID">ENTER_APP_ID</x:String>
  3. You can also set the app ID through the settings page of this sample.

Explore the Graph Controls

You can explore the different Graph Controls by clicking on control icons. Detailed documentations for each control can be found here: