Skip to content

Commit

Permalink
Updating repo to address older docs and fix build errors. (#1880)
Browse files Browse the repository at this point in the history
* Initialize open publishing repository: https://github.com/OneDrive/onedrive-api-docs of branch master

* Initialize open publishing repository: https://github.com/OneDrive/onedrive-api-docs of branch master

* updates for file handler docs

* fixing issues with link for filehandler examples

* fixing broken link

* wip

* wip

* wip

* wip

* wip

* wip

---------

Co-authored-by: daspek <[email protected]>
Co-authored-by: VesaJuvonen <[email protected]>
Co-authored-by: Barry Shehadeh <[email protected]>
  • Loading branch information
4 people authored Oct 31, 2024
1 parent 7ce3339 commit 9cd7b56
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 279 deletions.
2 changes: 1 addition & 1 deletion .openpublishing.publish.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
"targets": {},
"need_generate_pdf": false,
"need_generate_intellisense": false
}
}
52 changes: 26 additions & 26 deletions docs/rest-api/concepts/migrating-from-live-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,24 @@ To continue to integrate with Microsoft services, developers must update their a

Similar to the capabilities of Live Connect, Microsoft Graph has a number of resources available depending on the type of user data your app interacts with:

* [Microsoft account authentication](/graph/auth/)
* [OneDrive files](https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/onedrive)
* [Outlook calendar](https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/calendar)
* [Outlook messages](/graph/outlook-mail-concept-overview)
* [Personal contacts](https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/contact)
* [Profile and Identity API](https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/users)
* [Microsoft account authentication](https://learn.microsoft.com/graph/auth/)
* [OneDrive files](https://learn.microsoft.com/graph/api/resources/onedrive)
* [Outlook calendar](https://learn.microsoft.com/graph/api/resources/calendar)
* [Outlook messages](https://learn.microsoft.com/graph/outlook-mail-concept-overview)
* [Personal contacts](https://learn.microsoft.com/graph/api/user-list-contacts)
* [Profile and Identity API](https://learn.microsoft.com/graph/api/resources/user)

## Libraries

Microsoft Graph offers [client libraries](https://developer.microsoft.com/en-us/graph/code-samples-and-sdks) for many platforms that can integrate with your application similar to Live SDK.
Microsoft Graph offers [client libraries](https://developer.microsoft.com/graph/code-samples-and-sdks) for many platforms that can integrate with your application similar to Live SDK.

## Permissions

Microsoft Graph uses a different set of permission scopes than Live Connect.
To access the Microsoft Graph APIs, your app will need to switch permission scopes.
This requires your app to prompt the user for consent to sign in and consent to the new permissions.

See the [Microsoft Graph permission reference](/graph/permissions-reference) for the complete details.
See the [Microsoft Graph permission reference](https://learn.microsoft.com/graph/permissions-reference) for the complete details.

| Live Connect Scope | Microsoft Graph Permission | Description |
| ----------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
Expand Down Expand Up @@ -81,10 +81,10 @@ You will need to use the Microsoft Graph SDK or update your JSON mapping to use
| `GET /me` | `GET /me` | [Try it][1]. Returns the [user's profile][user], display name, and additional information. |
| `GET /me/picture` | `GET /me/photo/$value` | [Try it][2]. Returns the [user's profile photo][user-photo]. |

[1]: https://developer.microsoft.com/en-us/graph/graph-explorer?request=me/&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[2]: https://developer.microsoft.com/en-us/graph/graph-explorer?request=me/photo/$value&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[user]: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/users
[user-photo]: /graph/api/profilephoto-get
[1]: https://developer.microsoft.com/graph/graph-explorer?request=me/&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[2]: https://developer.microsoft.com/graph/graph-explorer?request=me/photo/$value&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[user]: https://developer.microsoft.com/graph/docs/api-reference/v1.0/resources/users
[user-photo]: https://learn.microsoft.com/graph/api/profilephoto-get

## Contacts API

Expand All @@ -100,10 +100,10 @@ You will need to use the Microsoft Graph SDK or update your JSON mapping to use
| `GET /{contact-id}` | `GET /me/contacts/{contact-id}` | [Try it][4]. Returns the data for a [specified contact][contacts]. |
| `POST /{contact-id}` | `POST /me/contacts` | Create a new [contact][create-contact]. |

[3]: https://developer.microsoft.com/en-us/graph/graph-explorer?request=me/contacts&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[4]: https://developer.microsoft.com/en-us/graph/graph-explorer?request=me/contacts/AAMkAGVmMDEzMTM4LTZmYWUtNDdkNC1hMDZiLTU1OGY5OTZhYmY4OABGAAAAAAAiQ8W967B7TKBjgx9rVEURBwAiIsqMbYjsT5e-T7KzowPTAAAAAAEOAAAiIsqMbYjsT5e-T7KzowPTAAAYbuK-AAA=&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[contacts]: /graph/api/user-list-contacts
[create-contact]: /graph/api/user-post-contacts
[3]: https://developer.microsoft.com/graph/graph-explorer?request=me/contacts&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[4]: https://developer.microsoft.com/graph/graph-explorer?request=me/contacts/AAMkAGVmMDEzMTM4LTZmYWUtNDdkNC1hMDZiLTU1OGY5OTZhYmY4OABGAAAAAAAiQ8W967B7TKBjgx9rVEURBwAiIsqMbYjsT5e-T7KzowPTAAAAAAEOAAAiIsqMbYjsT5e-T7KzowPTAAAYbuK-AAA=&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[contacts]: https://learn.microsoft.com/graph/api/user-list-contacts
[create-contact]: https://learn.microsoft.com/graph/api/user-post-contacts

## Calendar API

Expand All @@ -119,11 +119,11 @@ You will need to use the Microsoft Graph SDK or update your JSON mapping to use
| `GET /{calendar-id}` | `GET /me/events` | [Try it][6] Return [events][events] from the user's calendars. |
| `POST /{calendar-id}` | `POST /me/events` | Create a new [event][create-event] on the user's calendar. |

[5]: https://developer.microsoft.com/en-us/graph/graph-explorer?request=me/calendars&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[6]: https://developer.microsoft.com/en-us/graph/graph-explorer?request=me/events?$select=subject,body,bodyPreview,organizer,attendees,start,end,location&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[calendars]: /graph/api/user-list-calendars
[events]: /graph/api/user-list-events
[create-event]: /graph/api/user-post-events
[5]: https://developer.microsoft.com/graph/graph-explorer?request=me/calendars&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[6]: https://developer.microsoft.com/graph/graph-explorer?request=me/events?$select=subject,body,bodyPreview,organizer,attendees,start,end,location&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[calendars]: https://learn.microsoft.com/graph/api/user-list-calendars
[events]: https://learn.microsoft.com/graph/api/user-list-events
[create-event]: https://learn.microsoft.com/graph/api/user-post-events

## OneDrive REST API

Expand All @@ -150,10 +150,10 @@ For the complete details on navigating the contents of a user's OneDrive, see [G
| `GET /me/skydrive` | `GET /me/drive/root` | [Try it][7]. Retrieve the root folder in the user's OneDrive. |
| `GET /skydrive/get_item_preview` | `GET /me/drive/items/{item-id}/thumbnails` | Returns the available thumbnails for a file or folder in OneDrive. |

[7]: https://developer.microsoft.com/en-us/graph/graph-explorer?request=me/drive&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[8]: https://developer.microsoft.com/en-us/graph/graph-explorer?request=me/drive/items/01BYE5RZ5MYLM2SMX75ZBIPQZIHT6OAYPB&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[9]: https://developer.microsoft.com/en-us/graph/graph-explorer?request=me/drive/root/children&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[12]: https://developer.microsoft.com/en-us/graph/graph-explorer?request=me/drive?$select=quota&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[7]: https://developer.microsoft.com/graph/graph-explorer?request=me/drive&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[8]: https://developer.microsoft.com/graph/graph-explorer?request=me/drive/items/01BYE5RZ5MYLM2SMX75ZBIPQZIHT6OAYPB&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[9]: https://developer.microsoft.com/graph/graph-explorer?request=me/drive/root/children&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com
[12]: https://developer.microsoft.com/graph/graph-explorer?request=me/drive?$select=quota&method=GET&version=v1.0&GraphUrl=https://graph.microsoft.com

## File Picker for web apps

Expand All @@ -163,4 +163,4 @@ Version 5 of the Live SDK (OneDrive file picker) will no longer be functional af

## Additional resources

For more information about using Microsoft Graph, try the [Microsoft Graph Quick Start](https://developer.microsoft.com/en-us/graph/quick-start).
For more information about using Microsoft Graph, try the [Microsoft Graph Quick Start](https://developer.microsoft.com/graph/quick-start).
2 changes: 1 addition & 1 deletion docs/rest-api/getting-started/app-registration-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ you will need to configure details about your application with the following ste
tenancy you registered it in, or across multiple tenancies.
4. For web apps, generate the app secret and its duration.
5. Specify the permission levels your app requires from the Office 365 API
applications in Azure using [app permissions](/office/office-365-management-api/get-started-with-office-365-management-apis).
applications in Azure using app permissions.
Using OneDrive API or the file picker requires at least **Read user files**. Uploading, editing, or sharing files
requires the **Read and write user files** permission.

Expand Down
7 changes: 2 additions & 5 deletions docs/rest-api/getting-started/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: Learn how to authenticate and authorize your app for OneDrive acces
Before your app can make requests to OneDrive, it needs a user to authenticate and authorize the application to have access to their data.
The method for obtaining authorization differs depending on if your app is targeting OneDrive and SharePoint online, or SharePoint Server 2016.

Microsoft Graph, OneDrive, and SharePoint support using a standard [OAuth2](/azure/active-directory/develop/v2-oauth2-auth-code-flow) or [Open ID Connect](http://openid.net/connect/) authorization flow.
Microsoft Graph, OneDrive, and SharePoint support using a standard OAuth2 or [Open ID Connect](http://openid.net/connect/) authorization flow.
Requests to Microsoft Graph are authenticated using bearer tokens obtained from one of these flows.

## Microsoft Graph (OneDrive and SharePoint online)
Expand All @@ -36,15 +36,14 @@ Hybrid customers also have the option to use AAD authentication.

### AAD authentication

Hybrid customers, or on-premises customers who have [integrated their on-premises identities with AAD](https://azure.microsoft.com/documentation/articles/active-directory-aadconnect/) can use the OneDrive API with the standard [OAuth 2.0][oauth] authentication scheme to authenticate users and generate access tokens.
Hybrid customers, or on-premises customers who have [integrated their on-premises identities with AAD](https://azure.microsoft.com/documentation/articles/active-directory-aadconnect/) can use the OneDrive API with the standard OAuth 2.0 authentication scheme to authenticate users and generate access tokens.
OneDrive for Business uses [Azure Active Directory](https://portal.azure.com) to authenticate users and applications.

| Method | Description |
|:-------------------------------|:-----------------------------------------------------|
| [Sign in](aad-oauth.md) | Sign in to an AAD account and OneDrive for Business. |
| [Refresh][aad-refresh] | Refresh your access token. |

[oauth]: /azure/active-directory/develop/v2-oauth2-auth-code-flow
[aad-refresh]: aad-oauth.md#step-4-redeem-refresh-token-for-an-access-token-to-call-onedrive-api

### ACS authentication
Expand All @@ -55,8 +54,6 @@ SharePoint Server 2016 supports Windows, forms-based, and Security Assertion Mar
To perform ACS app authentication, the application needs to obtain an access token from either the Microsoft Azure Access Control Service (ACS), or by self-signing an access token with a certificate that SharePoint Server 2016 trusts.
Then, the access token asserts a request for access to a specific SharePoint resource and contains information that identifies the app and the associated user, instead of validating only the user’s credentials.

You can find more information about these three user authentication methods as well as ACS app authentication, in [Authentication Overview for SharePoint 2016](/sharepoint/security-for-sharepoint-server/authentication-overview).

### AD FS authentication

The OneDrive API can also use AD FS authentication in SharePoint Server 2016 to authenticate users and applications.
Expand Down
2 changes: 2 additions & 0 deletions docs/rest-api/getting-started/sharepoint-server-2016.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ ms.localizationpriority: Medium
---
# Getting started with OneDrive API with SharePoint Server 2016

> This article contains information that is no longer relevant
To get started using the OneDrive API with SharePoint Server 2016, follow these steps.

If you are using Microsoft Graph or connecting to OneDrive, OneDrive for Business, or SharePoint online, see [Getting started with OneDrive API](index.md).
Expand Down
Loading

0 comments on commit 9cd7b56

Please sign in to comment.