Surrogate

API Type

Web Services

Description

IIS does not support users who do not use Windows Active Directory authentication. To address this issue, AgilePoint uses a special type of user called an impersonator. Impersonators enable client applications to authenticate end users who use Active Directory authentication, as well as those who do not.

Impersonators must meet the following requirements:

  1. The impersonator must be a Windows Active Directory user to pass IIS authentication.
  2. The impersonator must be registered on the AgilePoint Server. The registration can be done through Enterprise Manager.
  3. The impersonator must be registered for the application under the Extension of AgilePoint Server Configuration. The application name is case sensitive.
  4. The impersonator does not need to be the administrator for AgilePoint Server, or even have workflow execution rights on AgilePoint.

This Surrogate function allows the impersonator to act as a surrogate for the specified user to complete IIS authentication. Once the authentication has passed, the web service API will be called based on the rights granted to the specified user on AgilePoint Server.

This function is called before calling any other AgilePoint Web Service API.

Syntax

public virtual void Surrogate(string userName)

Parameters

NameDescription

userName

Description:
The user name for the user.
Type
string
Allowed Values:
A valid user name for a registered AgilePoint user.

Output

None.

Example

public IWFWorkflowService GetWorkflowService( 
System.Net.ICredentials credentials, string 
username) 
{ 
    IWFWorkflowService svc = GetAdm(credentials); 
	svc.Surrogate(username); 
	return svc; 
} 

//Web service using Impersonator credentials that is registered in the AgilePoint Server 
//configuration with application name           
public IWFWorkflowService GetWorkflowService(System.Net.ICredentials credentials) 
{ 
	string url = … // AgilePoint Server web service Url 
	System.Net.CookieContainer cookieContainer = new
	System.Net.CookieContainer(); 
	WFWorkflowService svc = new WFWorkflowService(url); 
	svc.CookieContainer = cookieContainer; 
	svc.Credentials = credentials; 			       
	svc.SetClientAppName([your application name]); 
	//Current Locale 
	svc.SetClientLocale(Thread.CurrentThread.CurrentUICulture.Name); 
	return svc; 
} 

Supported Versions

3.2.0.4 and higher

Code Examples in the AgilePoint NX Documentation

The AgilePoint NX Product Documentation is intended as a basic reference to help you understand how to complete basic coding tasks, such as make API or JavaScript method calls. Code examples that show specific use cases, the solutions to specific business problems, or detailed implementation scenarios are outside the scope of the AgilePoint NX Product Documentation. For specific and/or advanced types of examples that may better meet your requirements, AgilePoint provides several resources:

  • AgilePoint Community Forums - A free, AgilePoint-moderated, crowd-sourcing user forum where you can ask questions about specific techniques, the solutions to use cases, workarounds, or other topics that may not be covered in the Product Documentation.
  • Professional Services - If you can not find the information you need for your specific business problem, mentoring is available through AgilePoint Professional Services.
  • Personalized Training - AgilePoint can provide personalized training for your organization. To request personalized training, contact AgilePoint Sales.