MSMQMessage.ReceivedAuthenticationLevel

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

(Introduced in MSMQ 2.0.) The ReceivedAuthenticationLevel property of the MSMQMessage object indicates whether the message was authenticated at the request of the sending application and indicates what type of digital signature was used.

Data type: Short
Run-time access: Read-only
Property ReceivedAuthenticationLevel As Short  

Property Value

ReceivedAuthenticationLevel can have any of the following values:

MQMSG_AUTHENTICATION_REQUESTED

Obsolete. This value is superseded by MQMSG_AUTHENTICATED_SIG10.

MQMSG_AUTHENTICATION_REQUESTED_EX

Obsolete. This value is superseded by MQMSG_AUTHENTICATED_SIG20. The sending application requested authentication using an MSMQ 2.0 signature.

MQMSG_AUTHENTICATED_SIG10

Introduced in MSMQ 3.0. Authentication was requested and the message was signed using an MSMQ 1.0 signature.

MQMSG_AUTHENTICATED_SIG20

Introduced in MSMQ 3.0. Authentication was requested and the message was signed using an MSMQ 2.0 signature.

MQMSG_AUTHENTICATED_SIG30

Introduced in MSMQ 3.0. Authentication was requested and the message was signed using an MSMQ 3.0 multiple-destination digital signature.

MQMSG_AUTHENTICATED_SIGXML

Introduced in MSMQ 3.0. Authentication was requested and the message was signed using an XML digital signature.

Remarks

This message property is used by the receiving application only when trying to determine if authentication was requested and what type of digital signature was used. Because messages that fail authentication are not placed in the destination queue, if authentication was requested and the message is in the queue, the message was authenticated. For information on the process Message Queuing uses to authenticate messages, see How Message Queuing Authenticates Messages.

Note

It is not possible to look at the properties of a message and determine if a message failed authentication. Messages that fail authentication are discarded and are not delivered to the destination queue.

If the receiving application needs to check only whether authentication was requested, the application does not care what type of digital signature was used to sign the message, it should use MSMQMessage.IsAuthenticated2. However, you cannot specify both message properties to validate authentication.

Message Queuing can use several different types of digital signatures to authenticate messages. For information on these signatures and how the sending application specifies which signature to use, see Digital Signatures. The signature type can also be specified by registry entries. For information on specifying the type of digital signature using registry entries, see Digital Signature Registry Entries.

Equivalent API Function Property

With API function calls, the equivalent property is PROPID_M_AUTHENTICATED_EX.

Example Code

The following example is included in Using Message Queuing.

For a complete example of See
Ascertaining whether a message was authenticated and the type of signature used Visual Basic Code Example: Validating Authentication

Requirements

Windows NT/2000/XP: Included in Windows 2000 and later.

Windows 95/98/Me: Unsupported.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib.

See Also

MSMQMessage
MSMQMessage.IsAuthenticated2
PROPID_M_AUTHENTICATED_EX