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
ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
5
-
IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
6
-
PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
3
+
### Summary ###
4
+
This WPF app show the output of various Office 365 API calls in a console alike output format. The goal of this app is the see the new API while keeping focus on the API calls themselves and less on the UI layer they're hosted in.
7
5
8
-
###A console application that shows the base features of the new Office 365 API
6
+
### Applies to ###
7
+
- Office 365 Multi Tenant (MT)
9
8
10
-
- Author - Bert Jansen (Microsoft)
11
-
- Date - 29/07/2014
12
-
- Version - 2.0
9
+
### Prerequisites ###
10
+
This sample requires the Office 365 API **preview** version released on August 5th 2014. See http://blogs.office.com/2014/08/05/office-365-api-tool-visual-studio-2013-summer-update/ for more details.
13
11
14
-
Note: this sample requires the Office 365 API preview version released on August 5th 2014. See http://blogs.office.com/2014/08/05/office-365-api-tool-visual-studio-2013-summer-update/ for more details.
2.0 | August 12th 2014 | Switched to WPF app and added documentation
21
+
1.0 | July 29th 2014 | Initial release
22
+
23
+
### Disclaimer ###
24
+
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
25
+
26
+
27
+
----------
28
+
29
+
# Prepare the scenario for your environment #
30
+
This application will use the new Office 365 API's to perform the following list of tasks:
31
+
- Discover the current user's OneDrive URL
32
+
- Discover the current user's Mail URL
33
+
- List the files and folders from the user's OneDrive
34
+
- Upload a file to the "Shared with everyone" folder in the user's OneDrive
35
+
- List all files and folders in the "Shared with everyone" folder of the user's OneDrive
36
+
- List the total number of mails in the user's mailbox
37
+
- Retrieve all mails in the Inbox, just print the first 10
38
+
- Send a mail with the sent mail ending up in the user's "Sent items" mailbox folder
39
+
- Create a mail in the "Drafts" mailbox folder
40
+
- Get all users from Azure AD, just print the first 10
41
+
42
+
For these tasks to succeed you need to provide some input before you run the application. This is done by changing the below code snippet in the MainWindow.xaml.cs class:
43
+
```C#
44
+
//TODO: update these values to make them relevant for your environment
When you run the sample you'll see a window with a big button named "Run demo" and a black output section. Click on the "Run demo" button to trigger the demo. What will first happen is that you need to logon with an Office 365 user account.
52
+

53
+
54
+
Once you've logged on the Office 365 API will ask you for permissions: you need to consent that the app access your data for the listed categories:
55
+

56
+
57
+
After those 2 steps are done the app can run and use all the API's to do it's work. The output is shown in console style:
58
+

59
+
60
+
## Some explanation about the API's themselves ##
61
+
The app is built by extending the default classess added when you hookup a connected service:
62
+
- ActiveDirectoryApiSample.cs
63
+
- CalendarApiSample.cs
64
+
- ContactsApiSample.cs
65
+
- MailApiSample.cs
66
+
- MyFilesApiSample.cs
67
+
- SitesApiSample.cs
68
+
69
+
The class DiscoveryAPISample.cs has been created manually. The default classes have been adopted to so that they can pass along the DiscoveryContext created during the first use. This is needed to avoid continues prompting for consent.
1.0 | November 6th 2013 (to update) | Initial release
26
+
27
+
### Disclaimer ###
28
+
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
0 commit comments