GithubHelp home page GithubHelp logo

uwp-csharp-controls-sample's Introduction

[ARCHIVED] UWP Graph Controls Sample App

IMPORTANT

This project is being archived and replaced with the Build UWP apps with the Microsoft Graph SDK training. As part of the archival process, we're closing all open issues and pull requests.

You can continue to use this sample "as-is", but it won't be maintained moving forward. We apologize for any inconvenience.

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 application

  1. Navigate to the the Azure portal - App registrations to register your app. Login using a personal account (aka: Microsoft Account) or Work or School Account.

  2. Select New registration. On the Register an application page, set the values as follows.

  • Set Name to UWP Graph Controls Sample App.
  • Set Supported account types to Accounts in any organizational directory and personal Microsoft accounts.
  • Leave Redirect URI empty.
  • Choose Register.
  1. On the UWP Graph Controls Sample App page, copy the values of both the Application (client) ID and the Directory (tenant) ID. Save these two values, since you will need them later.

  2. Select the Add a Redirect URI link. On the Redirect URIs page, locate the Suggested Redirect URIs for public clients (mobile, desktop) section. Select the URI that begins with msal and the urn:ietf:wg:oauth:2.0:oob URI.

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.

    <Application.Resources>
        <x:String x:Key="ida:ClientID">ENTER_APP_ID</x:String>
    </Application.Resources>
    
  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:

uwp-csharp-controls-sample's People

Contributors

darrelmiller avatar glitterhorn avatar jasonjoh avatar nokafor avatar titusgicheru 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.