Skip to content

Commit 39af4e3

Browse files
[msid]bugfix
1 parent 64fa189 commit 39af4e3

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

articles/active-directory/develop/tutorial-v2-android.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ms.custom: aaddev, identityplatformtop40, has-adal-ref
1919

2020
In this tutorial, you build an Android app that integrates with the Azure Active Directory (Azure AD) to sign in users and get an access token to call the Microsoft Graph API.
2121

22-
When you've completed this tutorial, your application will accept sign-ins of personal Microsoft accounts (including outlook.com, live.com, and others) as well as work or school accounts from any company or organization that uses Azure AD.
22+
When you've completed this tutorial, 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 AD.
2323

2424
In this tutorial:
2525

@@ -68,9 +68,9 @@ Follow these steps to create a new project if you don't already have an Android
6868
1. Select **Register**.
6969
1. Under **Manage**, select **Authentication** > **Add a platform** > **Android**.
7070
1. Enter your project's Package Name. If you downloaded the code, this value is `com.azuresamples.msalandroidapp`.
71-
1. In the **Signature hash** section of the **Configure your Android app** pane, select **Generating a development Signature Hash.** and copy the KeyTool command to your command line..
71+
1. In the **Signature hash** section of the **Configure your Android app** pane, select **Generating a development Signature Hash.** and copy the KeyTool command to your command line.
7272

73-
- KeyTool.exe is installed as part of the Java Development Kit (JDK). You must also install the OpenSSL tool to execute the KeyTool command. Refer to the [Android documentation on generating a key](https://developer.android.com/studio/publish/app-signing#generate-key) for more information.
73+
- KeyTool.exe is installed as part of the Java Development Kit (JDK). You must also install the OpenSSL tool to execute the KeyTool command. For more information, see [Android documentation on generating a key](https://developer.android.com/studio/publish/app-signing#generate-key) for more information.
7474

7575
1. Enter the **Signature hash** generated by KeyTool.
7676
1. Select **Configure** and save the **MSAL Configuration** that appears in the **Android configuration** pane so you can enter it when you configure your app later.
@@ -79,7 +79,7 @@ Follow these steps to create a new project if you don't already have an Android
7979
### Configure your application
8080

8181
1. In Android Studio's project pane, navigate to **app\src\main\res**.
82-
1. Right-click **res** and choose **New** > **Directory**. Enter `raw` as the new directory name and click **OK**.
82+
1. Right-click **res** and choose **New** > **Directory**. Enter `raw` as the new directory name and select **OK**.
8383
1. In **app** > **src** > **main** > **res** > **raw**, create a new JSON file called `auth_config_single_account.json` and paste the MSAL Configuration that you saved earlier.
8484

8585
Below the redirect URI, paste:
@@ -111,7 +111,7 @@ Follow these steps to create a new project if you don't already have an Android
111111

112112
As this tutorial only demonstrates how to configure an app in Single Account mode, see [single vs. multiple account mode](./single-multi-account.md) and [configuring your app](./msal-configuration.md) for more information
113113

114-
1. In **app** > **src** > **main** > **AndroidManifest.xml**, add the `BrowserTabActivity` activity below to the application body. This entry allows Azure AD to call back to your application after it completes the authentication:
114+
1. In **app** > **src** > **main** > **AndroidManifest.xml**, add the `BrowserTabActivity` activity after the application body. This entry allows Azure AD to call back to your application after it completes the authentication:
115115

116116
```xml
117117
<!--Intent filter to capture System Browser or Authenticator calling back to our app after sign-in-->
@@ -132,7 +132,7 @@ Follow these steps to create a new project if you don't already have an Android
132132
- Use your Azure portal **Package name** to replace `android:host=.` value. It should look like `com.azuresamples.msalandroidapp`.
133133
- Use your Azure portal **Signature Hash** to replace `android:path=` value. Ensure that there's a leading `/` at the beginning of your Signature Hash. It should look like `/1wIqXSqBj7w+h11ZifsnqwgyKrY=`.
134134

135-
You'll also be able to find these values in the Authentication blade of your app registration.
135+
You can find these values in the Authentication blade of your app registration as well.
136136

137137
### Add MSAL and relevant libraries to your project
138138

@@ -257,7 +257,7 @@ Follow these steps to create a new project if you don't already have an Android
257257
}
258258
```
259259

260-
1. Open _SingleAccountModeFragment_ and replace the code with following code snippet to initializes a single-account application, loads a user account, and gets a token to call the Microsoft Graph API:
260+
1. Open _SingleAccountModeFragment_ and replace the code with following code snippet to initialize a single-account application, loads a user account, and gets a token to call the Microsoft Graph API:
261261

262262
```java
263263
package com.azuresamples.msalandroidapp;
@@ -903,7 +903,7 @@ After you sign in, the app will display the data returned from the Microsoft Gra
903903

904904
### Consent
905905

906-
The first time any user signs into your app, they'll be prompted by Microsoft identity to consent to the permissions requested. Some Azure AD tenants have disabled user consent which requires admins to consent on behalf of all users. To support this scenario, you'll either need to create your own tenant or receive admin consent.
906+
The first time any user signs into your app, they'll be prompted by Microsoft identity to consent to the permissions requested. Some Azure AD tenants have disabled user consent, which requires admins to consent on behalf of all users. To support this scenario, you'll either need to create your own tenant or receive admin consent.
907907

908908
## Clean up resources
909909

articles/active-directory/develop/tutorial-v2-shared-device-mode.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Refer to the [configuration documentation](./msal-configuration.md) for more inf
5959

6060
Set `"shared_device_mode_supported"` to `true` in your MSAL configuration file.
6161

62-
You may not be planning to support multiple-account mode. That could be if you're not using a shared device, and the user can sign into the app with more than one account at the same time. If so, set `"account_mode"` to `"SINGLE"`. This guarantees that your app will always get `ISingleAccountPublicClientApplication`, and significantly simplifies your MSAL integration. The default value of `"account_mode"` is `"MULTIPLE"`, so it is important to change this value in the config file if you're using `"single account"` mode.
62+
You may not be planning to support multiple-account mode. That could be if you're not using a shared device, and the user can sign into the app with more than one account at the same time. If so, set `"account_mode"` to `"SINGLE"`. This guarantees that your app will always get `ISingleAccountPublicClientApplication`, and significantly simplifies your MSAL integration. The default value of `"account_mode"` is `"MULTIPLE"`, so it's important to change this value in the config file if you're using `"single account"` mode.
6363

6464
Here's an example of the auth_config.json file included in the **app**>**main**>**res**>**raw** directory of the sample app:
6565

@@ -85,7 +85,7 @@ Here's an example of the auth_config.json file included in the **app**>**main**>
8585

8686
### Detect shared-device mode
8787

88-
Shared-device mode allows you to configure Android devices to be shared by multiple employees, while providing Microsoft Identity backed management of the device. Employees can sign in to their devices and access customer information quickly. When they are finished with their shift or task, they will be able to sign-out of all apps on the shared device with a single click and the device will be immediately ready for the next employee to use.
88+
Shared-device mode allows you to configure Android devices to be shared by multiple employees, while providing Microsoft Identity backed management of the device. Employees can sign in to their devices and access customer information quickly. When they're finished with their shift or task, they'll be able to sign-out of all apps on the shared device with a single click and the device will be immediately ready for the next employee to use.
8989

9090
Use `isSharedDevice()` to determine if an app is running on a device that is in shared-device mode. Your app could use this flag to determine if it should modify UX accordingly.
9191

@@ -122,7 +122,7 @@ PublicClientApplication.create(this.getApplicationCOntext(),
122122

123123
If you're writing an app that will only be used for first-line workers on a shared device, we recommend you write your app to only support single-account mode. This includes most applications that are task focused such as medical records apps, invoice apps, and most line-of-business apps. This will simplify your development as many features of the SDK won't need to be accommodated.
124124

125-
If your app supports multiple accounts as well as shared device mode, you must perform a type check and cast to the appropriate interface as shown below.
125+
If your app supports multiple accounts and shared device mode, you must perform a type check and cast to the appropriate interface as shown below.
126126

127127
```java
128128
private IPublicClientApplication mApplication;
@@ -207,9 +207,9 @@ private void onSignOutClicked()
207207

208208
### Receive broadcast to detect global sign out initiated from other applications
209209

210-
To receive the account change broadcast, you'll need to register a broadcast receiver.  It’s recommended to register your broadcast receiver via the [Context-registered receivers](https://developer.android.com/guide/components/broadcasts#context-registered-receivers).
210+
To receive the account change broadcast, you need to register a broadcast receiver.It’s recommended to register your broadcast receiver via the [Context-registered receivers](https://developer.android.com/guide/components/broadcasts#context-registered-receivers).
211211

212-
When an account change broadcast is received, immediately [get the signed in user and determine if a user has changed on the device](#get-the-signed-in-user-and-determine-if-a-user-has-changed-on-the-device). If a change is detected, initiate data cleanup for previously signed-in account. It is recommended to properly stop any operations and do data cleanup.
212+
When an account change broadcast is received, immediately [get the signed in user and determine if a user has changed on the device](#get-the-signed-in-user-and-determine-if-a-user-has-changed-on-the-device). If a change is detected, initiate data cleanup for previously signed-in account. It's recommended to properly stop any operations and do data cleanup.
213213
214214
The following code snippet shows how you could register a broadcast receiver.
215215
@@ -245,7 +245,7 @@ For information on how to do this, refer to [Register your application](./tutori
245245

246246
:::image type="content" source="media/tutorial-v2-shared-device-mode/register-app.png" alt-text="Configure your Android app page in Azure portal quickstart":::
247247

248-
You should select **Make this change for me** and then provide the values the quickstart asks for in the Azure portal. When that's done, we will generate all the configuration files you need.
248+
You should select **Make this change for me** and then provide the values the quickstart asks for in the Azure portal. When that's done, we'll generate all the configuration files you need.
249249

250250
:::image type="content" source="media/tutorial-v2-shared-device-mode/config-info.png" alt-text="Configure your project page in Azure portal quickstart":::
251251

@@ -257,7 +257,7 @@ For testing purposes, set up the following in your tenant: at least two employee
257257

258258
### Download the Authenticator App
259259

260-
Download the Microsoft Authenticator App from the Google Play store. If you already have the app downloaded, ensure that it is the latest version.
260+
Download the Microsoft Authenticator App from the Google Play store. If you already have the app downloaded, ensure that it's the latest version.
261261
262262
### Authenticator app settings & registering the device in the cloud
263263
@@ -293,7 +293,7 @@ Once you've put a device in shared-mode, it becomes known to your organization a
293293
294294
## Running the sample app
295295
296-
The Sample Application is a simple app that will call the Graph API of your organization. On first run you'll be prompted to consent as the application is new to your employee account.
296+
The Sample Application is a simple app that will call the Graph API of your organization. On first run, you'll be prompted to consent as the application is new to your employee account.
297297

298298
:::image type="content" source="media/tutorial-v2-shared-device-mode/run-app-permissions-requested.png" alt-text="Application configuration info screen":::
299299

0 commit comments

Comments
 (0)