AadLogin Class

Definition

Caution

This control will be removed in a future release of the toolkit. Please use the new Graph controls at https://aka.ms/wgt

The AAD Login Control leverages MSAL libraries to support basic AAD sign-in processes for Microsoft Graph and beyond.

[System.Obsolete("This control will be removed in a future release of the toolkit. Please use the new Graph controls at https://aka.ms/wgt")]
[Windows.UI.Xaml.TemplatePart(Name="RootGrid", Type=typeof(Windows.UI.Xaml.Controls.Grid))]
[Windows.UI.Xaml.TemplatePart(Name="ContentPresenter", Type=typeof(Windows.UI.Xaml.Controls.ContentPresenter))]
public class AadLogin : Windows.UI.Xaml.Controls.Button
[<System.Obsolete("This control will be removed in a future release of the toolkit. Please use the new Graph controls at https://aka.ms/wgt")>]
[<Windows.UI.Xaml.TemplatePart(Name="RootGrid", Type=typeof(Windows.UI.Xaml.Controls.Grid))>]
[<Windows.UI.Xaml.TemplatePart(Name="ContentPresenter", Type=typeof(Windows.UI.Xaml.Controls.ContentPresenter))>]
type AadLogin = class
    inherit Button
Public Class AadLogin
Inherits Button
Inheritance
Windows.UI.Xaml.Controls.Button
AadLogin
Attributes
ObsoleteAttribute Windows.UI.Xaml.TemplatePartAttribute

Constructors

AadLogin()

Initializes a new instance of the AadLogin class.

Fields

AllowSignInAsDifferentUserProperty

Identifies the AllowSignInAsDifferentUser dependency property.

CurrentUserIdProperty

Identifies the CurrentUserId dependency property.

DefaultImageProperty

Identifies the DefaultImage dependency property.

SignInAnotherUserDefaultTextProperty

Identifies the SignInAnotherUserDefaultText dependency property.

SignInDefaultTextProperty

Identifies the SignInDefaultText dependency property.

SignOutDefaultTextProperty

Identifies the SignOutDefaultText dependency property.

ViewProperty

Identifies the View dependency property.

Properties

AllowSignInAsDifferentUser

Gets or sets a value indicating whether AllowSignInAsDifferentUser menu button is enabled for logged in user.

CurrentUserId

Gets the unique identifier for current signed in user.

DefaultImage

Gets or sets the default user photo

GraphService

Gets the Microsoft.Toolkit.Services.MicrosoftGraph.MicrosoftGraphService instance

RequiredDelegatedPermissions

Gets required delegated permissions for the AadLogin control

SignInAnotherUserDefaultText

Gets or sets a value for default text of the Sign-in-with-another-account button.

SignInDefaultText

Gets or sets a value for default sign-in text.

SignOutDefaultText

Gets or sets a value for default sign-out text.

View

Gets or sets a value indicating which view type will be presented, the default value is PictureOnly.

Methods

OnApplyTemplate()

Override default OnApplyTemplate to capture child controls

SignInAsync()

This method is used to prompt to login screen.

SignOutAsync()

This method is used to sign out the currently signed on user

Events

SignInCompleted

Occurs when the user is logged in.

SignOutCompleted

Occurs when the user is logged out.

Applies to