This repository has been archived by the owner on Aug 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Small changes + documentation changes, including document MD template
- Loading branch information
Showing
6 changed files
with
161 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,79 @@ | ||
#Readme | ||
# Office 365 API demo application (PREVIEW) # | ||
|
||
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. | ||
### Summary ### | ||
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. | ||
|
||
###A console application that shows the base features of the new Office 365 API | ||
### Applies to ### | ||
- Office 365 Multi Tenant (MT) | ||
|
||
- Author - Bert Jansen (Microsoft) | ||
- Date - 29/07/2014 | ||
- Version - 2.0 | ||
### Prerequisites ### | ||
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. | ||
|
||
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. | ||
### Solution ### | ||
Solution | Author(s) | ||
---------|---------- | ||
Office365Api.Overview | Bert Jansen (**Microsoft**) | ||
|
||
### Version history ### | ||
Version | Date | Comments | ||
---------| -----| -------- | ||
2.0 | August 12th 2014 | Switched to WPF app and added documentation | ||
1.0 | July 29th 2014 | Initial release | ||
|
||
### Disclaimer ### | ||
**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.** | ||
|
||
|
||
---------- | ||
|
||
# Prepare the scenario for your environment # | ||
This application will use the new Office 365 API's to perform the following list of tasks: | ||
- Discover the current user's OneDrive URL | ||
- Discover the current user's Mail URL | ||
- List the files and folders from the user's OneDrive | ||
- Upload a file to the "Shared with everyone" folder in the user's OneDrive | ||
- List all files and folders in the "Shared with everyone" folder of the user's OneDrive | ||
- List the total number of mails in the user's mailbox | ||
- Retrieve all mails in the Inbox, just print the first 10 | ||
- Send a mail with the sent mail ending up in the user's "Sent items" mailbox folder | ||
- Create a mail in the "Drafts" mailbox folder | ||
- Get all users from Azure AD, just print the first 10 | ||
|
||
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: | ||
```C# | ||
//TODO: update these values to make them relevant for your environment | ||
private string uploadFile = @"C:\temp\bulkadusers.xlsx"; | ||
private string serviceResourceId = "https://<tenant>.sharepoint.com"; | ||
private string siteUrl = "https://<tenant>.sharepoint.com/sites/<sitename>"; | ||
private string sendMailTo = "<email address>"; | ||
``` | ||
## Run the sample ## | ||
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. | ||
![](http://i.imgur.com/RIGgm7H.png) | ||
|
||
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: | ||
![](http://i.imgur.com/6bDBl5w.png) | ||
|
||
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: | ||
![](http://i.imgur.com/LQnkq5W.png) | ||
|
||
## Some explanation about the API's themselves ## | ||
The app is built by extending the default classess added when you hookup a connected service: | ||
- ActiveDirectoryApiSample.cs | ||
- CalendarApiSample.cs | ||
- ContactsApiSample.cs | ||
- MailApiSample.cs | ||
- MyFilesApiSample.cs | ||
- SitesApiSample.cs | ||
|
||
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. | ||
|
||
```C# | ||
//static DiscoveryContext _discoveryContext; | ||
public static DiscoveryContext _discoveryContext | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# title of the PnP sample # | ||
|
||
### Summary ### | ||
Short summary. | ||
|
||
### Applies to ### | ||
- Office 365 Multi Tenant (MT) | ||
- Office 365 Dedicated (D) | ||
- SharePoint 2013 on-premises | ||
|
||
-> Remove platforms if needed | ||
|
||
### Prerequisites ### | ||
Any special pre-requisites? | ||
|
||
### Solution ### | ||
Solution | Author(s) | ||
---------|---------- | ||
solution name | Author | ||
|
||
### Version history ### | ||
Version | Date | Comments | ||
---------| -----| -------- | ||
2.0 | March 21st 2014 (to update/remove)| comment | ||
1.0 | November 6th 2013 (to update) | Initial release | ||
|
||
### Disclaimer ### | ||
**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.** | ||
|
||
|
||
---------- | ||
|
||
# Doc scenario 1 # | ||
Description | ||
Image | ||
|
||
|
||
## Sub level 1.1 ## | ||
Description: | ||
Code snippet: | ||
```C# | ||
string scenario1Page = String.Format("scenario1-{0}.aspx", DateTime.Now.Ticks); | ||
string scenario1PageUrl = csomService.AddWikiPage("Site Pages", scenario1Page); | ||
``` | ||
|
||
## Sub level 1.2 ## | ||
|
||
# Doc scenario 2 # | ||
|
||
## Sub level 2.1 ## | ||
|
||
## Sub level 2.2 ## | ||
|
||
### Note: ### | ||
|
||
## Sub level 2.3 ## | ||
|
||
# Doc scenario 3# | ||
|