Implementing credentials under which specific procedures run by using XML

You can use the SetExecuteAs procedure of the MPF Config namespace to configure one or more procedures of a specific namespace to run under specific credentials in Microsoft Provisioning Framework (MPF). Only credentials previously defined in MPF (using Provisioning Manager) are available for implementation using this procedure. To determine which credentials are available, use the GetCredentials procedure. No rollback support is provided for this procedure.

This procedure expects to be called with impersonate="1". The procedure impersonates the caller.

Example of a request that calls the SetExecuteAs procedure

<request>
  <procedure>
	<execute namespace="MPF Config" procedure="SetExecuteAs" impersonate="1">
	<executeData>
		<namespace>Managed Hosting</namespace>
		<username>MPSPrivilegedAcct</username>
		<procedure>GetOrgType</procedure>
	</executeData>
	<after source="executeData" sourcePath="procedures"
		destination="data" />
	<after source="executeData" sourcePath="credential"
		destination="data" ifNull="ignore" />
	</execute>
  </procedure>
</request>

Input for SetExecuteAs

The following input is valid for this request:

Typical response for SetExecuteAs

This procedure returns information showing the procedures modified to use the specified credentials, as well as user credentials (including the domain and name of the user) under which the specified procedure is to run.

<response>
  <data>
	<procedures>
	<procedure name="GetOrgType" access="public" type="read" runAsCredentialID="1" />
	</procedures>
	<credential domain="contoso01" username="MPSPrivilegedAcct" 
		user="contoso01\MPSPrivilegedAcct" id="1" />
  </data>
</response>

Important