Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 2.24 KB

active-directory-develop-guidedsetup-android-introduction.md

File metadata and controls

51 lines (38 loc) · 2.24 KB
title description services documentationcenter author manager editor ms.service ms.devlang ms.topic ms.tgt_pltfrm ms.workload ms.date ms.author ms.custom
include file
include file
active-directory
dev-center-name
andretms
mtillman
active-directory
na
include
na
identity
09/13/2018
andret
include file

Sign in users and call the Microsoft Graph from an Android app

In this tutorial, you'll learn how to build an Android application and integrate it into Microsoft identity platform. Specifically, this app will sign in a user, get an access token to call the Microsoft Graph API, and make a basic request to the Microsoft Graph API.

When you've completed the guide, your application will accept sign-ins of personal Microsoft accounts (including outlook.com, live.com, and others) and work or school accounts from any company or organization that uses Azure Active Directory.

How the sample app generated by this guide works

How this sample works

The app in this sample will sign in users and get data on their behalf. This data will be accessed via a remote API (Microsoft Graph API in this case) that requires authorization and is also protected by Microsoft identity platform.

More specifically,

  • Your app will launch a web page to sign in the user.
  • Your app will be issued an access token for the Microsoft Graph API.
  • The access token will be included in the HTTP request to the web API.
  • Process the Microsoft Graph response.

This sample uses the Microsoft Authentication library for Android (MSAL) to be coordinating and helping with Auth. MSAL will automatically renew tokens, deliver SSO between other apps on the device, help manage the Account(s), and handle most Conditional Access cases.

Prerequisites

  • This Guided Setup uses Android Studio 3.0.
  • Android 21 or later is required (25+ is recommended).
  • Google Chrome or a web browser that uses Custom Tabs is required for this version of MSAL for Android.

Library

This guide uses the following authentication library:

Library Description
com.microsoft.identity.client Microsoft Authentication Library (MSAL)