Unable to encrypt SQL Server TDE with CMK

Tariq Salat 101 Reputation points

I have created a SQL Server via REST API Method and trying to encrypt TDE with CMK. However, I am unable to encrypt server with CMK. I have to manually go to server and encrypt with CMK first and save and then again encrypt it with Service-managed encryption and save. After that when I try to update encryption via REST API then it works but not at the first time when new server is created.
Can anyone please help me with this.

Azure SQL Database
{count} votes