You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[MSAL Android documentation](https://learn.microsoft.com/en-us/entra/msal/android/)|[Microsoft Entra ID (workforce samples)](https://learn.microsoft.com/en-us/entra/identity-platform/sample-v2-code?tabs=apptype#mobile) <br/> [Microsoft Entra External ID (customer samples)](https://learn.microsoft.com/en-us/entra/identity-platform/sample-v2-code?tabs=apptype#mobile)|[ MSAL Android reference](http://javadoc.io/doc/com.microsoft.identity.client/msal)|[Get support](README.md#community-help-and-support)|
7
6
8
7
## Overview
9
8
@@ -19,9 +18,11 @@ The Azure Active Directory Authentication Library (ADAL) for Android was depreca
19
18
20
19
## Getting started
21
20
22
-
To use MSAL Android in your application, you need to register your application in the Microsoft Entra Admin center and configure your Android project. Since MSAL Android supports both browser-delegated and native authentication experiences, follow the steps in the following tutorials based on your scenario.
23
-
• For browser-delegated scenarios, refere to the quickstart, [Sign in users and call Microsoft Graph from an Android app](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-mobile-app-android-sign-in)
24
-
• For Native Authentication scenarios, refer to the Microsoft Entra External ID sample guide, [Run Android Kotlin sample app](https://review.learn.microsoft.com/en-us/entra/external-id/customers/how-to-run-sample-android-app?branch=pr-en-us-2021#register-an-application)
21
+
To use MSAL Android in your application, you need to register your application in the Microsoft Entra Admin center and configure your Android project. Since MSAL Android supports both browser-delegated and native authentication experiences, follow the steps in the following tutorials based on your scenario.
22
+
23
+
* For browser-delegated scenarios, refer to the quickstart, [Sign in users and call Microsoft Graph from an Android app](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-mobile-app-android-sign-in).
24
+
25
+
* For Native Authentication scenarios, refer to the Microsoft Entra External ID sample guide, [Run Android Kotlin sample app](https://review.learn.microsoft.com/en-us/entra/external-id/customers/tutorial-native-authentication-prepare-android-app?branch=release-native-auth-public-preview).
25
26
26
27
27
28
## Using MSAL Android
@@ -36,7 +37,7 @@ To use MSAL Android in your application, you need to register your application i
36
37
37
38
Add the following dependencies to your app's build.gradle:
38
39
39
-
**For browser-delegated authentication**
40
+
**For browser-delegated authentication:**
40
41
41
42
```gradle
42
43
dependencies {
@@ -52,7 +53,7 @@ maven {
52
53
}
53
54
```
54
55
55
-
**For Native Authentication**
56
+
**For Native authentication:**
56
57
57
58
58
59
```java
@@ -67,10 +68,9 @@ maven {
67
68
68
69
### Step 2: Create your MSAL configuration file
69
70
70
-
**Browser-delegated Authentication:**
71
-
72
-
It's simplest to create your configuration file as a "raw" resource file in your project resources. You'll be able to refer to this using the generated resource identifier when constructing an instance of PublicClientApplication. If you are registering your app in the portal for the first time, you will also be provided with the detailed MSAL [Android configuration file](https://learn.microsoft.com/en-us/entra/msal/android/msal-configuration)
71
+
**Browser-delegated authentication:**
73
72
73
+
It's simplest to create your configuration file as a "raw" resource file in your project resources. You'll be able to refer to this using the generated resource identifier when constructing an instance of PublicClientApplication. If you are registering your app in the Microsoft Entra admin center for the first time, you will also be provided with the detailed MSAL [Android configuration file](https://learn.microsoft.com/en-us/entra/msal/android/msal-configuration)
74
74
75
75
```javascript
76
76
{
@@ -80,11 +80,11 @@ It's simplest to create your configuration file as a "raw" resource file in your
80
80
}
81
81
```
82
82
83
-
>NOTE: In the `redirect_uri`, the part`<YOUR_PACKAGE_NAME>` refers to the package name returned by the `context.getPackageName()` method. This package name is the same as the [`application_id`](https://developer.android.com/studio/build/application-id) defined in your `build.gradle` file.
83
+
In the `redirect_uri`, the `<YOUR_PACKAGE_NAME>` refers to the package name returned by the `context.getPackageName()` method. This package name is the same as the [`application_id`](https://developer.android.com/studio/build/application-id) defined in your `build.gradle` file.
84
84
85
-
>NOTE: This is the minimum required configuration. MSAL relies on the defaults that ship with the library for all other settings. Please refer to the [configuration file documentation](https://learn.microsoft.com/en-us/entra/msal/android/msal-configuration) to understand the library defaults.
85
+
The values above are the minimum required configuration. MSAL relies on the defaults that ship with the library for all other settings. Please refer to the [MSAL Android configuration file documentation](https://learn.microsoft.com/en-us/entra/msal/android/msal-configuration) to understand the library defaults.
86
86
87
-
**For Native Authentication:**
87
+
**For Native authentication:**
88
88
89
89
1. Right-click res and choose New > Directory. Enter raw as the new directory name and select OK.
90
90
1. In this new folder (app > src > main > res > raw), create a new JSON file called auth_config_native_auth.json and paste the following template MSAL Configuration:
0 commit comments