Azure-Samples / ms-identity-dotnetcore-maui

MAUI sample using MSAL library
MIT License
35 stars 14 forks source link

page_type: sample languages:

A MAUI mobile or desktop application using Microsoft Entra ID for authentication

About this sample

Scenario

You have a mobile or Windows desktop application and you want it to consume either Microsoft Graph or your own Web API using the Microsoft Identity Platform to acquire tokens.

Structure of the repository

This repository contains a three-part tutorial - a basic scenario, a more advanced with broker scenario and a scenario using Azure Active Directory B2C. Choose the one that best suits your scenario, or go through both to understand the differences between the implementations.

Sub folder Description
MauiAppBasic This sample app shows how to use the Microsoft identity platform endpoint to sign-in a user interactively and display their profile

Topology
MauiAppWithBroker This chapter adds additional support for the broker (Microsoft Authenticator), which enables more complex scenarios, like device related conditional access and SSO.

Topology
MauiAppB2C This sample app shows how to use the Microsoft identity platform endpoint to sign-in a user interactively with Azure Active Directory B2C and display their access permissions

Topology

How to run this sample for MAUI

To run this sample, you'll need:

Step 1: Clone or download this repository

From your shell or command line:

git clone https://github.com/Azure-Samples/ms-identity-dotnetcore-maui.git

or download and exact the repository .zip file.

Given that the name of the sample is pretty long, and so are the name of the referenced NuGet packages, you might want to clone it in a folder close to the root of your hard drive, to avoid file size limitations on Windows.

Then navigate to the sub-folder of your choice, MauiAppBasic, MauiAppWithBroker or MauiAppB2C

Community Help and Support

Use Stack Overflow to get support from the community. Ask your questions on Stack Overflow first and browse existing issues to see if someone has asked your question before. Make sure that your questions or comments are tagged with [msal dotnet].

If you find a bug in the sample, please raise the issue on GitHub Issues.

If you find a bug in msal.Net, please raise the issue on MSAL.NET GitHub Issues.

To provide a recommendation, visit the following User Voice page.

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.

More information

For more information, see MSAL.NET's conceptual documentation: