@Surakshit Sharma Apologies for the delay in response and all the inconvenience caused because of the issue.
Assuming from your query you might be following this .I tested same in my lab by creating new policy.
First the policy definition will be as highlighted by running the command as mentioned in the article:
az policy definition list --query "[?displayName=='Audit VMs that do not use managed disks']"
Now I ran the above command as mentioned by you in the query which threw the same error as you :
I did some digging and as per mentioned here defined policy scope as below we need to write the scope for resource group in below format:
'/subscriptions/{SubscriptionID}/resourcegroups/{ResourceGroupName}'
Again I ran the same command as mentioned by you and changed the scope as above where final command will look something like below and it worked for me :
az policy assignment create --name 'audit-vm-manageddisks' --display-name 'Audit VMs without managed disks Assignment' --scope '/subscriptions/<Subscriptionid>/resourcegroups/prmanhas-Compute' --policy '06a78e20-9358-41c9-923c-fb736d382a4d'
Same should work for you too :)
Hope it helps!!!
Please "Accept as Answer" if it helped so it can help others in community looking for help on similar topics.