Issue with Az Repos Policy Merge-Strategy Update

Hello All,

Need some assistance in resolving the merge strategy policy id issue, please find the details below:

Issue Description:

We wanted to implement merge strategy policies in Azure DevOps which is to ensure the Pull Requests are merged using “squash commit” mode only. But while running the pipeline by using Az CLI command we are facing the this invalid literal issue.

CLI Command:

az repos policy merge-strategy update --policy-id fa4e907d-c16b-4a4c-9dfa-4916e5d171ab --allow-no-fast-forward false --allow-rebase false --allow-rebase-merge false --allow-squash true --blocking false --branch main --enabled true --org https://dev.azure.com/xyz/ --project --repository-id

Error Log Details:

While running the above command in az cli, we are encountering the following error:

ERROR: invalid literal for int() with base 10: ‘fa4e907d-c16b-4a4c-9dfa-4916e5d171ab’
##[error]Script failed with exit code: 1

Microsoft Documentation:

https://docs.microsoft.com/en-us/cli/azure/repos/policy/merge-strategy?view=azure-cli-latest#az_repos_policy_merge_strategy_update

Kindly, assist in resolving this issue.

Looking forward for some positive responses.

Thanks,
Sainath Krishna