Hello @PS3 大南 勝/Ominami, Masaru (NTT DATA),
Unfortunately, Azure Managed HSM does not support C_SetPIN to change the PIN via the PKCS#11 interface.The PIN for user authentication is managed at the Azure Managed HSM resource level, not via PKCS#11 commands.
The PKCS#11 interface provided by Azure Managed HSM supports a limited subset of functions, and C_SetPIN is not included in the supported list. Please find the list of functions below-
https://github.com/microsoft/AzureManagedHsmTLSOffload?tab=readme-ov-file#supported-api-operations
This means that you cannot programmatically change the PIN using C_SetPIN in Azure Managed HSM. If you need to update credentials, you would typically manage them through the Azure portal or CLI, depending on how your HSM users and roles are configured.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".