Quantcast
Viewing all articles
Browse latest Browse all 5347

Impersonation Project Server 2013

Hello,

Currently I'm creating a integration between an external program and EPM 2013 with the PSI. For this I must use impersonation in combination with the PSI of project server 2013. But when using code from the Microsoft side for impersonation I get an obsolete warning (which I want to avoid). http://msdn.microsoft.com/en-us/library/office/ff181538(v=office.14).aspx

It is about the following code:

// Set the impersonation context for calls to the PSI on behalf of 
// the impersonated user.
internal static void SetImpersonationContext(bool isWindowsUser, String userNTAccount,
    Guid userGuid, Guid trackingGuid, Guid siteId,
    CultureInfo languageCulture, CultureInfo localeCulture)
{
    contextString = GetImpersonationContext(isWindowsUser, userNTAccount, userGuid,
        trackingGuid, siteId, languageCulture, localeCulture);
}

// Get the impersonation context.
private static String GetImpersonationContext(
    bool isWindowsUser, String userNTAccount,
    Guid userGuid, Guid trackingGuid, Guid siteId,
    CultureInfo languageCulture, CultureInfo localeCulture)
{
    PSLibrary.PSContextInfo contextInfo = new PSLibrary.PSContextInfo(
        isWindowsUser, userNTAccount, userGuid, trackingGuid,
        siteId, languageCulture, localeCulture);
    String contextInfoString = PSLibrary.PSContextInfo.SerializeToString( 
        contextInfo);

    return contextInfoString;
}

The constructor of PSILibrary.PSContextInfo gives the warning.

Does anyone know how to apply impersonation in Project Server 2013? (PSI prefered, but CSOM also welcome)

Thanks in advance


Viewing all articles
Browse latest Browse all 5347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>