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
{{ message }}
This repository was archived by the owner on Mar 7, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+20-8Lines changed: 20 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,17 +35,29 @@ Follow these steps to install the sample code on your computer:
35
35
36
36
To run the sample, you will need to register an application and add the registered application's ID to the configuration information in the [config.py](https://github.com/microsoftgraph/python-sample-console-app/blob/master/helpers.py) file. Follow these steps to register and configure your application:
37
37
38
-
1.Sign in to the [Azure Portal](https://portal.azure.com) and choose **Azure Active Directory** in the sidebar, then choose **App registrations** and **New application registration**.
38
+
1.Navigate to the [Azure portal > App registrations](https://go.microsoft.com/fwlink/?linkid=2083908) to register your app. Sign in using a work or school account, or a personal Microsoft account.
39
39
40
-
2. Enter a unique name for your application, choose **Native** for the Application type, and enter any valid URL for **Redirect URI**. (The Redirect URI is not used in this sample, but you must enter a valid URL during app registration.) Then choose **Create**.
41
-

40
+
2. Select **New registration**.
42
41
43
-
3. After the application is created, you'll be returned to the **App registrations** list. Choose your app from the list to open the settings page. Once you have the app settings page open, copy the **Application ID** and save it. You'll need this later to complete the setup process.
44
-

42
+
3. When the **Register an application page** appears, set the values as follows:
43
+
1. Set **Name** to `PythonConsoleApp`.
44
+
2. Set **Supported account types** to **Accounts in any organizational directory and personal Microsoft accounts**.
45
+
3. Leave **Redirect URI** empty.
46
+
4. Choose **Register**.
45
47
46
-
4. The final step in app registration is to add the permissions that the sample app requires. From the app settings page, choose **Required permissions**, then **Add**, then **Select an API**. Then choose **Microsoft Graph** and **Select**. Here you'll see a list of _Delegated Permissions_. Check the box next to these permissions:
47
-
***Have full access to user files** (this is the _Files.ReadWrite_ permission needed to upload files to your OneDrive account)
48
-
***Send email as a user** (this is the _Mail.Send_ permission needed to send email)
48
+
4. On the **PythonConsoleApp** overview page, copy and save the value for the **Application (client) ID**. You'll need it later.
49
+
50
+
5. Select **API permissions**.
51
+
1. Choose the **Add a permission** button and then make sure that the **Microsoft APIs** tab is selected.
52
+
2. In the **Commonly used Microsoft APIs** section, select **Microsoft Graph**, and then select **Delegated permissions**.
53
+
3. Use the **Select permissions** search box to search for the `Files.ReadWrite` and `Mail.Send` permissions.
54
+
4. Select the checkbox for each permission as it appears.
55
+
> **NOTE:** Permissions will not remain visible in the list as you select each one.
56
+
57
+
6. Go to the **Authentication** page.
58
+
1. Check the box next to `https://login.microsoftonline.com/common/oauth2/nativeclient`.
59
+
2. Find the setting labeled **Default client type** and set it to `Yes`.
60
+
3. Select **Save** at the top of the page.
49
61
50
62
After registering your application, modify the ```config.py``` file in the root folder of your cloned repo, and follow the instructions to enter your Client ID (the Application ID value you copied in Step 3 earlier). Save the change, and you're ready to run the sample.
0 commit comments