Expand Minimize

Admin.UpdateUserSyncSetting method

Updates the setting for user synchronization with Project Web App, project sites, and email.

Namespace:  WebSvcAdmin
Assembly:  ProjectServerServices (in ProjectServerServices.dll)

[SoapDocumentMethodAttribute("http://schemas.microsoft.com/office/project/server/webservices/Admin/UpdateUserSyncSetting", RequestNamespace = "http://schemas.microsoft.com/office/project/server/webservices/Admin/", 
	ResponseNamespace = "http://schemas.microsoft.com/office/project/server/webservices/Admin/", 
	Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public void UpdateUserSyncSetting(
	UserSyncSettings userSyncSetting
)

Parameters

userSyncSetting
Type: WebSvcAdmin.UserSyncSettings

One or more enumerated user synchronization settings.

NoteNote

Use Microsoft.Office.Project.Server.Library.Admin.UserSyncSettings for the correct enumeration values.

Project Server Permissions

Permission

Description

ManageWindowsSharePointServices

Enables a user to manage the project site. Global permission.

The following example shows the use of the UpdateUserSyncSettings method. It disables synchronization with project sites for the application user. SvcAdmin is the namespace of the Admin service in the ProjectServerServices.dll proxy assembly. For information about creating a PSI proxy assembly and an app.config file, see Prerequisites for WCF-based code samples in Project 2013.

using System;
using System.Text;
using PSLibrary = Microsoft.Office.Project.Server Library;

namespace Microsoft.SDK.Project.Samples.UpdateUserSyncSetting
{
    class Program
    {
        private const string ENDPOINT = "basicHttp_Admin";

        private static SvcAdmin.AdminClient adminClient;

        static void Main(string[] args)
        {
            ConfigClientEndpoints(ENDPOINT);

            int syncSettings = (int)PSLibrary.Admin.UserSyncSettings.DisablePWS;

            Console.WriteLine("SyncSettings value: {0}", syncSettings.ToString());

            adminClient.UpdateUserSyncSetting((PSLibrary.Admin.UserSyncSettings)syncSettings);

            Console.Write("\nPress any key to exit... ");
            Console.ReadKey(true);
        }

        // Use the endpoints that are defined in app.config to configure the client.
        public static void ConfigClientEndpoints(string endpt)
        {
            adminClient = new SvcAdmin.AdminClient(endpt);
        }
    }
}

The console output is: SyncSettings = 12

Community Additions

ADD
Show:
© 2014 Microsoft