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

The SenderIdType property of the MSMQMessage object specifies the type of sender identifier found by MSMQ. Currently, the only type of sender identifier available to Message Queuing is a security identifier (SID).

Data type: Long
Run-time access: Read/write
Property SenderIdType As Long  

Property Value

Message Queuing sets SenderIdType to one of the following values:


MSMQMessage.SenderId is not attached to the message.


The default. The SenderId property contains a SID for the user sending the message.


If the sending application does not want Message Queuing to authenticate who sent the message, it can specify MQMSG_SENDERID_TYPE_NONE when sending a message. This tells Message Queuing not to attach the SID to the message in the MSMQMessage.SenderId property. However, if the sender identifier is not sent with the message, the access rights for placing messages in the queue must be allowed for members of the Everyone group.

The receiving application can use SenderIdType to determine what type of sender identifier was attached to the message.

A SID of a local user (a user not logged on to a Windows® 2000 or Windows Server 2003 domain) is only valid locally. Even if a local user specifies a SID, it is not sent with the message.

Equivalent API Function Property

With API function calls, the equivalent property is PROPID_M_SENDERID_TYPE.


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

Windows 95/98/Me: Included in Windows 95 and later.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib.

See Also