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
Copy file name to clipboardExpand all lines: README.md
+32-30Lines changed: 32 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ The application demonstrates the following:
29
29
### Prerequisites
30
30
31
31
- Visual Studio 2015 or later with Visual C++ development features installed
32
-
- Python 2.7 installed and in the system path
32
+
- Python 2.7 or greater installed and in the system path
33
33
34
34
### Sample Setup
35
35
@@ -50,40 +50,42 @@ Authentication against the Azure AD tenant requires creating a native applicatio
50
50
> Skip this step if you've already created a registration for previous sample. You may continue to use that client ID.
51
51
52
52
1. Go to https://portal.azure.com and log in as a global admin.
53
-
> Your tenant may permit standard users to register applications. If you aren't a global admin, you can attempt these steps, but may need to work with a tenant administrator to have an application registered or be granted access to register applications.
54
-
2. Click Azure Active Directory, then **App Registrations** in the menu blade.
55
-
3. Click **View all applications**
56
-
4. Click **New Applications Registration**
57
-
5. For name, enter **MipSdk-Sample-Apps**
58
-
6. Set **Application Type** to **Native**
59
-
7. For Redirect URI, enter **mipsdk-auth-sample://authorize**
60
-
> Note: This can be anything you'd like, but should be unique in the tenant.
61
-
8. Click **Create**
62
-
63
-
The **Registered app** blade should now be displayed.
64
-
65
-
1. Click **Settings**
66
-
2. Click **Required Permissions**
67
-
3. Click **Add**
68
-
4. Click **Select an API**
69
-
5. Select **Microsoft Rights Management Services** and click **Select**
70
-
6. Under **Select Permissions** select **Create and access protected content for users**
71
-
7. Click **Select** then **Done**
72
-
8. Click **Add**
73
-
9. Click **Select an API**
74
-
10. In the search box, type **Microsoft Information Protection Sync Service** then select the service and click **Select**
75
-
11. Under **Select Permissions** select **Read all unified policies a user has access to.**
76
-
12. Click **Select** then **Done**
77
-
13. In the **Required Permissions** blade, click **Grant Permissions** and confirm.
53
+
> Your tenant may permit standard users to register applications. If you aren't a global admin, you can attempt these steps, but may need to work with a tenant administrator to have an application registered or be granted access to register applications.
54
+
2. Select Azure Active Directory, then **App Registrations** on the left side menu.
55
+
3. Select **New registration**
56
+
4. For name, enter **MipSdk-Sample-Apps**
57
+
5. Under **Supported account types** set **Accounts in this organizational directory only**
58
+
> Optionally, set this to **Accounts in any organizational directory**.
59
+
6. Select **Register**
60
+
61
+
The **Application registration** screen should now be displaying your new application.
62
+
63
+
### Add API Permissions
64
+
65
+
1. Select **API Permissions**
66
+
2. Select **Add a permission**
67
+
3. Select **Azure Rights Management Services**
68
+
4. Select **Delegated permissions**
69
+
5. Check **user_impersonation** and select **Add permissions** at the bottom of the screen.
70
+
6. In the **API permissions** menu, select **Grant admin consent for <TENANTNAME>** and confirm.
71
+
72
+
### Set Redirect URI
73
+
74
+
1. Select **Authentication**.
75
+
2. Select **Add a platform**.
76
+
3. Select **Mobile and desktop applications**
77
+
4. Select the default native client redirect URI, which should look similar to **https://login.microsoftonline.com/common/oauth2/nativeclient**.
78
+
5. Under **Advanced settings** set **Treat as a public client** to **yes**.
79
+
> This is required only for the MIP SDK sample apps using MSAL for Python.
80
+
6. Select **configure** and be sure to save and changes if required.
78
81
79
82
### Update Client ID, Username, and Password
80
83
81
84
1. Open up **main.cpp**.
82
-
2. Find line 62 and replace **YOUR CLIENT ID HERE** with the client ID copied from the AAD App Registration.
83
-
3. Update the strings for application name and version on line 62.
84
-
4. Find line 69 and enter your test username and password.
85
+
2. Replace **YOUR CLIENT ID HERE** with the client ID copied from the AAD App Registration.
86
+
3. Find the tokens for **YOUR USERNAME HERE** and **YOUR PASSWORD HERE** and insert test user credentials.
85
87
86
-
> Hard coding a username and password isn't recommended. For the scope of this sample, it's an easier way to abstract auth. We'll update this soon, but for now this is a good cross-platform example.
88
+
> DO NOT hard code a production username and password.
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
0 commit comments