WSManPluginAuthzOperationComplete function (wsman.h)

Called from the WSManPluginAuthzOperation plug-in entry point. It reports either a successful or failed authorization for a user operation.


DWORD WSManPluginAuthzOperationComplete(
  [in]           WSMAN_SENDER_DETAILS *senderDetails,
  [in]           DWORD                flags,
  [in, optional] PVOID                userAuthorizationContext,
  [in]           DWORD                errorCode,
  [in, optional] PCWSTR               extendedErrorInformation


[in] senderDetails

A pointer to the WSMAN_SENDER_DETAILS structure that was passed into the WSManPluginAuthzOperation plug-in call.

[in] flags

Reserved for future use. Must be zero.

[in, optional] userAuthorizationContext

Specifies a plug-in defined context that is used to help track user context information. This context can be returned to multiple calls, to this call, or to an operation call. The plug-in manages reference counting for all calls. If the user record times out or re-authorization is required, the WinRM (WinRM) infrastructure calls WSManPluginAuthzReleaseContext.

[in] errorCode

Reports either a successful or failed authorization. If the authorization is successful, the code should be ERROR_SUCCESS. If the user is not authorized to perform the operation, the error should be ERROR_ACCESS_DENIED. If a failure happens for any other reason, an appropriate error code should be used. Any error from this call will be sent back as a Simple Object Access Protocol (SOAP) fault packet.

[in, optional] extendedErrorInformation

Specifies an XML document that contains any extra error information that needs to be reported to the client. This parameter is ignored if errorCode is NO_ERROR. The user interface language of the thread should be used for localization.

Return value

The method returns ERROR_SUCCESS if it succeeded; otherwise, it returns ERROR_INVALID_PARAMETER. If ERROR_INVALID_PARAMETER is returned, either the senderDetails parameter was NULL or the flags parameter was not zero.


Minimum supported client Windows 7
Minimum supported server Windows Server 2008 R2
Target Platform Windows
Header wsman.h
Library WsmSvc.lib
DLL WsmSvc.dll
Redistributable Windows Management Framework on Windows Server 2008 with SP2 and Windows Vista with SP2