Skip to content
This repository was archived by the owner on Oct 10, 2023. It is now read-only.

Commit bb6764b

Browse files
committed
Identity client and registration instructions update
1 parent 583d82c commit bb6764b

File tree

14 files changed

+2864
-3834
lines changed

14 files changed

+2864
-3834
lines changed

README.md

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,51 @@ If you want to run the iOS project in this sample, you'll need the following:
5151

5252
You can use the [Visual Studio Emulator for Android](https://www.visualstudio.com/features/msft-android-emulator-vs.aspx) if you want to run the Android project.
5353

54-
## Register and configure the app
55-
56-
The first thing you need to do is to register your app in the [Application Registration Portal](https://apps.dev.microsoft.com).
57-
58-
1. Sign in to the [Application Registration Portal](https://apps.dev.microsoft.com).
59-
1. Choose **Add an app**.
60-
1. Enter a name for the app and choose **Create**.
61-
1. Choose **Add Platform**, then choose **Native Application**.
62-
1. Choose **Save**.
54+
## Register the application
55+
56+
1. Navigate to the [the Azure portal - App registrations](https://go.microsoft.com/fwlink/?linkid=2083908) to register your app. Login using a **personal account** (aka: Microsoft Account) or **Work or School Account**.
57+
58+
2. Select **New registration**. On the **Register an application** page, set the values as follows.
59+
60+
* Set **Name** to `[SUGGESTED APP NAME]`.
61+
* Set **Supported account types** to **Accounts in any organizational directory and personal Microsoft accounts**.
62+
* Leave **Redirect URI** empty.
63+
* Choose **Register**.
64+
65+
3. On the **[SUGGESTED APP NAME]** page, copy the values of both the **Application (client) ID** and the **Directory (tenant) ID**. Save these two values, since you will need them later.
66+
67+
4. Select the **Add a Redirect URI** link. On the **Redirect URIs** page, locate the **Suggested Redirect URIs for public clients (mobile, desktop)** section. Select the URI that begins with `msal` **and** the **urn:ietf:wg:oauth:2.0:oob** URI.
68+
69+
5. [CONFIRM THAT THESE INSTRUCTIONS WORK FOR YOUR SAMPLE] Open the sample solution in Visual Studio and then open the **Constants.cs** file. Change the **Tenant** string to the **Directory (tenant) ID** value you copied earlier. Change the **ClientIdForUserAuthn** string to the **Application (client) ID** value.
70+
71+
Markdown template for native app registration with application permissions (app calls MS Graph):
72+
All areas to be filled are indicated with square brackets and caps, e.g. [APP NAME].
73+
Please reshape the content or headings as needed to match the specific sample's requirements.
74+
75+
## Register the application
76+
77+
1. Navigate to the [the Azure portal - App registrations](https://go.microsoft.com/fwlink/?linkid=2083908) to register your app. Login using a **Work or School Account**.
78+
79+
2. Select **New registration**. On the **Register an application** page, set the values as follows.
80+
81+
* Set **Name** to **Xamarin Native PropertyManager**.
82+
* Set **Supported account types** to **Accounts in any organizational directory**.
83+
* Leave **Redirect URI** empty.
84+
* Choose **Register**.
85+
86+
3. On the **Xamarin Native PropertyManager** page, copy and save the values for the **Application (client) ID** and the **Directory (tenant) ID**. You will need them in step 7.
87+
88+
4. Select **Certificates & secrets** under **Manage**. Select the **New client secret** button. Enter a value in **Description**, select any option for **Expires** and choose **Add**.
89+
90+
5. Copy the client secret value before leaving the page. You will need it in the next step.
91+
92+
6. Open the sample solution in Visual Studio and then open the **Constants.cs** file. Change the **Tenant** string to the **Directory (tenant) ID** value you copied earlier. Similarly, change the **ClientIdForAppAuthn** string to the **Application (client) ID** value and change the **ClientSecret** string to the client secret value.
93+
94+
7. Return to the Azure Active Directory management center. Select **API permissions** and then select **Add a permission**. On the panel that appears, choose **Microsoft Graph** and then choose **Application permissions**.
95+
96+
8. Use the **Select permissions** search box to search for the following permissions: User.Read, Group.ReadWrite.All, Sites.Read.All, Files.ReadWrite.All, Tasks.ReadWrite, Directory.Read.All. Select the check box for each permission as it appears (note that the permissions will not remain visible in the list as you select each one). Select the **Add permissions** button at the bottom of the panel.
97+
98+
9. Choose the **Grant admin consent for [tenant name]** button. Select **Yes** for the confirmation that appears.
6399

64100
## Build and debug
65101

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto">
3-
<uses-sdk android:minSdkVersion="25" android:targetSdkVersion="25" />
3+
<uses-sdk android:minSdkVersion="25" android:targetSdkVersion="28" />
44
<uses-permission android:name="android.permission.INTERNET" />
55
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
66
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
77
<application android:label="Property Manager">
8-
<activity android:name="microsoft.identity.client.BrowserTabActivity">
9-
<intent-filter>
10-
<action android:name="android.intent.action.VIEW" />
11-
<category android:name="android.intent.category.DEFAULT" />
12-
<category android:name="android.intent.category.BROWSABLE" />
13-
<data android:scheme="msal[CLIENT_ID]" android:host="auth" />
14-
</intent-filter>
15-
</activity>
16-
</application>
8+
<activity android:name="microsoft.identity.client.BrowserTabActivity">
9+
<intent-filter>
10+
<action android:name="android.intent.action.VIEW" />
11+
<category android:name="android.intent.category.DEFAULT" />
12+
<category android:name="android.intent.category.BROWSABLE" />
13+
<data android:scheme="msal[CLIENT_ID]" android:host="auth" />
14+
</intent-filter>
15+
</activity>
16+
</application>
1717
</manifest>

0 commit comments

Comments
 (0)