Hiya,
The behaviour you describe is not limited to XMS .NET clients. All client types of IBM MQ (C, JMS, .NET) provide the queue manager with the userid that the application is running as. The reason for this is that IBM MQ's authority model is a user based authority model. As such, somewhere in the authentication stages of MQ we need to end up with a user we can identify the connection as and authorize against. In IBM MQ the order of preference for obtaining a user to use for identity is:
- User the application is running as. (Not recommended)
- User defined in Channel MCAUSER field
- User authentication by Connection Authentication (only if CONNAUTH and ADOPTCTX(YES) are used)
- User set via a mapped channel authentication record (USRSOURCE(MAP) + MCAUSER)
- A security exit
As you are connecting only with TLS certificates and the TLS Certificates cannot be used as an identity for MQ's authority model, the queue manager has to source the identity from somewhere else. In your case it is the first option.
Your options here, as the application owner, are to run the application as a different user. I'm not aware of a way programmatically to change what user the application runs as.