Partager via


Using Windows Live Services to personalize apps (XAML)

[This article is for Windows 8.x and Windows Phone 8.x developers writing Windows Runtime apps. If you’re developing for Windows 10, see the latest documentation]

You can personalize your Windows Runtime apps using C++, C#, or Visual Basic to offer additional value to your users by including the features of Windows Live Services.

The Live SDK lets Windows Runtime apps use data from a user's Microsoft account profile, from Outlook.com, and from Microsoft OneDrive to provide a personalized and connected experience. The Live SDK uses industry-standard protocols such as OAuth 2.0 and JavaScript Object Notation (JSON) to interoperate with other platforms.

Live SDK features

The Live SDK lets your Windows Runtime apps built for Windows using C# or Visual Basic use Windows Live Services features to provide a personalized and connected experience for your customers. Windows Runtime apps built for Windows using C++ can use the C++ REST SDK (or the Windows::Web::Http::HttpClient class) and the Live REST API to access these same features. For more information, see Connecting to mobile services.

In this section, you can learn more about these Live SDK features:

  • Identity API features
  • OneDrive API features
  • Outlook.com API features

Identity API features

The Identity API lets you personalize your Windows Runtime apps using C++, C#, or Visual Basic. In Windows Store apps, the single sign-on feature makes this personalization a seamless part of the Windows user experience.

  • Seamless personalization

    You can let users sign in to their Microsoft account by using a control provided by the Live SDK. After they've signed in, your Windows Runtime apps can access their profile info.

  • Profile info

    Your Windows Runtime apps can access the profile info that users add to their Microsoft account, making your app their app. Some of the profile info that your app can access includes the user's first name, last name, gender, and birth date.

Learn more about the Identity API

OneDrive API features

The OneDrive API lets your app's users store their photos, videos, and documents in the cloud where they can access them from any device. Your Windows Runtime apps using C++, C#, or Visual Basic can save the user's personal content in the cloud to share with others. Your Windows Runtime apps can also bring their cloud content into its own user experience. Users can share content in their OneDrive with other users without requiring those users to be OneDrive users or even to have a Microsoft account.

The OneDrive API makes these sharing scenarios possible from your Windows Runtime apps:

  • Photos and videos

    Let users select, upload, and share photos and videos that they have created in your app. Apps for editing images or video can connect to the cloud and let users touch up their photos and make them more dramatic with filters.

  • Documents

    Let users access their documents, spreadsheets, and presentations from anywhere and from any device. Your app can help users create, access, and edit their documents in OneDrive.

Learn more about the OneDrive API.

Outlook.com API features

The Outlook.com API lets your Windows Runtime apps using C++, C#, or Visual Basic interact with the contacts and calendars that users keep in their Outlook.com accounts. Your app can use this info to enhance the connected experience for your users.

You can make your Windows Runtime apps more engaging to your customers by using the Outlook.com API to access their:

  • Contacts

    Connect your customers to other people they know who also use your app.

  • Calendars

    Give your customers a reason to return to your app by subscribing them to your app's shared calendars or by creating events that are available to your customers on all of their devices.

Learn more about the Outlook.com API.

Getting started using Windows Live Services in your Windows Runtime apps using C++, C#, or Visual Basic

These steps describe how to get ready to use the Live SDK in your Windows Runtime apps.

Preparing your development computer to use Windows Live Services in your Windows Runtime apps

Prepare your Windows 8 development computer by:

  1. Downloading and installing the tools and SDK for developing Windows Runtime apps, if they aren't already installed. This download includes Microsoft Visual Studio and other tools.
  2. Downloading and installing the Live SDK.

Preparing your account to use Windows Live Services in your Windows Store apps:

Before you start developing a Windows Store app that uses Windows Live Services, you must have a Windows Store developer account. If you don't have one already, you can create one from your Dashboard.

You must register your Windows Store apps that use Windows Live Services in your Dashboard before they can use any Windows Live Services features.

Using Windows Live Services in your Windows Runtime apps using C++, C#, or Visual Basic

After your development computer has the necessary software and your accounts have been set up, visit the following topics for more info about how to use Windows Live Services features in your Windows Runtime apps.

In this section

Topic Description

Quickstart: Personalizing your app

Your Windows Runtime app using C++, C#, or Visual Basic can use Windows Live Services to access info from the user's Microsoft account profile by using the Live SDK.

How to connect to Windows Live using the C++ REST SDK

In a C++ Windows Runtime app, you use the Live SDK REST reference directly to connect to Windows Live services. C++ apps can't use the Live SDK (Microsoft.Live.DLL) because that SDK is only for .NET projects. However, the C++ REST SDK, which is included in Microsoft Visual Studio, provides a convenient native C++ API for making REST calls. This tutorial shows how to use the C++ REST SDK to sign into OneDrive, which is one of the Live services, and then upload and download photos. It also demonstrates a best practice for connected apps—users can sign in, sign out, and know their connected status at all times.

Requirements for Microsoft account sign-in

Follow these guidelines to help ensure an appropriate Microsoft account sign-in experience for users of your Windows Store apps using C++, C#, or Visual Basic.

 

Windows Live Services Developer Center

Windows Live Services developer documentation