When we are trying to create the CMG for VMSS in CloudMgr.log can see the below error.
ERROR: Resource Manager - Failed to finish deployment. Check [Monitor/Activity log] on Azure Portal for more information SMS_CLOUD_SERVICES_MANAGER 12/17/2022 2:41:11 AM 11316 (0x2C34)
Resource Manager - Getting deployment operation details for deployment CreateKeyVault cga3b4e4-af43-40ab-869c-e1d25f7cb862 in resource group ABC SMS_CLOUD_SERVICES_MANAGER 2/17/2022 2:41:11 AM 11316 (0x2C34)
Resource Manager - Got deployment operation details for deployment CreateKeyVaultcga3b4e4-af43-40ab-869c-e1d25f7cb862 in resource group ABC SMS_CLOUD_SERVICES_MANAGER 2/17/2022Â 2:41:11 AM 11316 (0x2C34)
ERROR: Resource Manager - Deployment operation details: {"value":[{"id":"/subscriptions/cga3b4e4-af43-40ab-869c-e1d25f7cb862Â /resourceGroups/ABC/providers/Microsoft.Resources/deployments/CreateKeyVaultcga3b4e4-af43-40ab-869c-e1d25f7cb862Â /operations/3A147DB86B09D513","operationId":"3A147DB86B09D513","properties":{"provisioningOperation":"Create","provisioningState":"Failed","timestamp":"2022-12-17T06:40:58.1327537Z","duration":"PT1.2442684S","trackingId":"16bc2fee-f88f-5d3c-7e96-345e3e942345","statusCode":"Conflict","statusMessage":{"error":{"code":"VaultAlreadyExists","message":"The vault name 'MECMTechie' is already in use. Vault names are globally unique so it is possible that the name is already taken. If you are sure that the vault name was not taken then it is possible that a vault with the same name was recently deleted but not purged after being placed in a recoverable state. If the vault is in a recoverable state then the vault will need to be purged before reusing the name. For more information about VaultAlreadyExists, soft delete and purging a vault follow this link https://go.microsoft.com/fwlink/?linkid=2147740."}},"targetResource":{"id":"/subscriptions/cga3b4e4-af43-40ab-869c-e1d25f7cb862/resourceGroups/ABC/providers/Microsoft.KeyVault/vaults/MECMTechie","resourceType":"Microsoft.KeyVault/vaults","resourceName":"MECMTechie"}}}]} SMS_CLOUD_SERVICES_MANAGER 12/17/2022 2:41:11 AM 11316 (0x2C34)
We are prompting the above error because there is another already Key Vault created and creating conflict.
Login to Azure Portal
Search with Key Vaults
Click on Managed Deleted Vaults
Select the subscription and delete the key.
Run the Synchronize configuration in SCCM.