Skip to content

Commit bad8218

Browse files
more updates
1 parent 30daff9 commit bad8218

1 file changed

Lines changed: 29 additions & 3 deletions

File tree

README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ maven {
5959

6060
**Browser-delegated authentication:**
6161

62-
Create your configuration file as a "raw" resource in your project. Refer to it using the generated resource identifier when constructing a `PublicClientApplication` instance.. If you're registering your app in the Microsoft Entra admin center for the first time, you'll also be provided with the detailed MSAL [Android configuration file](https://learn.microsoft.com/en-us/entra/msal/android/msal-configuration)
62+
Create your configuration file as a "raw" resource in your project. Refer to it using the generated resource identifier when constructing a `PublicClientApplication` instance. If you're registering your app in the Microsoft Entra admin center for the first time, you'll also be provided with the detailed MSAL [Android configuration file](https://learn.microsoft.com/en-us/entra/msal/android/msal-configuration)
6363

6464
```javascript
6565
{
@@ -129,9 +129,35 @@ The values above are the minimum required configuration. MSAL relies on the def
129129
130130
### Step 4: Create an MSAL PublicClientApplication
131131

132-
For browser-delegated authentication, you'll need to create an instance of the PublicClientApplication, before you can acquire a token silently or interactively. Please proceed to the official MSAL Android documentation on how to [instantiate your client application and acquire tokens](https://learn.microsoft.com/en-us/entra/msal/android/acquire-tokens).
132+
**Browser-delegated authentication**
133133

134-
For a native authentication experience, you optionally complete [additional logging configuration](https://review.learn.microsoft.com/en-us/entra/external-id/customers/tutorial-native-authentication-prepare-android-app?branch=release-native-auth-public-preview#create-sdk-instance), and proceed to creating an instance of the client application using the configuration we created in [Step 2](README.md#step-2-create-your-msal-configuration-file). Learn more by following the [Native auth Android app tutorial](https://review.learn.microsoft.com/en-us/entra/external-id/customers/tutorial-native-authentication-prepare-android-app?branch=release-native-auth-public-preview#create-sdk-instance).
134+
For browser-delegated authentication, you create an instance of the PublicClientApplication, before you can acquire a token silently or interactively.
135+
136+
```java
137+
PublicClientApplication.createMultipleAccountPublicClientApplication(getContext(),
138+
R.raw.msal_config,
139+
new IPublicClientApplication.IMultipleAccountApplicationCreatedListener() {
140+
@Override
141+
public void onCreated(IMultipleAccountPublicClientApplication application) {
142+
mMultipleAccountApp = application;
143+
}
144+
```
145+
146+
Learn how to [instantiate your client application and acquire tokens](https://learn.microsoft.com/en-us/entra/msal/android/acquire-tokens) in the official MSAL Android documentation.
147+
148+
149+
**Native authentication**
150+
151+
For native authentication, you create an instance of the client application as follows:
152+
153+
```kotlin
154+
authClient = PublicClientApplication.createNativeAuthPublicClientApplication(
155+
this,
156+
R.raw.auth_config_native_auth
157+
)
158+
```
159+
160+
Learn more by following the [Native auth Android app tutorial](https://learn.microsoft.com/en-us/entra/external-id/customers/tutorial-native-authentication-prepare-android-app#create-sdk-instance).
135161

136162
## ProGuard
137163

0 commit comments

Comments
 (0)