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

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

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.

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