Scope Class

Current information about Live Connect is now available in the Windows Live Developer Center. The information in the following sections is provided for legacy purposes only.

Represents Windows Live resources and actions that can be performed with resources.

Feature:  Microsoft.Live
Namespace:  Microsoft.Live

The JavaScript Library for Windows Live Messenger Connect is built by using the Microsoft Ajax Library. Microsoft Ajax exposes a type system that enables you to add object-oriented capabilities to your JavaScript code. To learn more about creating, instantiating, and deriving from classes, see Creating Custom Client Script by Using the Microsoft Ajax Library.

Microsoft.Live.Scope = function();


The Scope class fields represent combinations of Windows Live resources and actions that can be performed on the resources by use of the JavaScript API. You can use the Scope fields to do the following:

You can also define application scopes declaratively on the Application Control. The Application Control is used when the scopes are well-defined and known ahead of time, while the Scope class is used when the scope changes depending on context or is not known ahead of time.

For more information about scopes, see Messenger Connect Scopes.

The following code example demonstrates how to set a requested scope prior to sign-in.

            Microsoft.Live.App.get_auth().set_requestedScopes([Microsoft.Live.Scope.wl_Contacts_View, Microsoft.Live.Scope.wl_Profiles_View]);


Windows Live Messenger Connect

Supported in: 4.1

Internet Explorer 8.0, Internet Explorer 7.0, Internet Explorer 6.0, Firefox 3.6, Firefox 3.5, Firefox 3.0, Firefox 2.0, Firefox 1.5, Chrome 4.0, Chrome 3.0, Chrome 2.0, Chrome 1.0, Safari 4.0, Safari 3.0