Hello @Patrice Jean-Baptiste ,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
I understand that you would like to know how to disable copy/paste in Azure Bastion.
By default, Azure Bastion is automatically enabled to allow copy and paste for all sessions connected through the bastion resource. You don't need to configure anything additional. This applies to both the Basic and the Standard SKU tier. If you want to disable this feature, you can disable it for web-based clients on the configuration page of your Bastion resource.
- In the Azure portal, go to your Bastion resource.
- Go to the Configuration page.
- To disable, clear/unselect the "Copy and paste" checkbox. NOTE: Disable is only available with the Standard SKU. You can upgrade the SKU if necessary. To upgrade from the Basic Tier (SKU) to Standard, you can refer the following doc: https://learn.microsoft.com/en-us/azure/bastion/upgrade-sku. Once you upgrade, you can't revert back to the Basic SKU without deleting and reconfiguring Bastion. Currently, this setting can be configured in the Azure portal only.
- Apply changes. The bastion host will update.
Refer: https://learn.microsoft.com/en-us/azure/bastion/bastion-vm-copy-paste#configure
You can also run Azure CLI command az network bastion update
with parameter --disable-copy-paste
to disable it.
Kindly let us know if the above helps or you need further assistance on this issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.