I'm working with Azure DevOps and have multiple repositories with various branches, each having specific branch policies. Specifically, I want to identify repositories that share the same branch policies on their develop branch. What would be the most effective way to retrieve a list of Azure DevOps repositories that have identical branch policies applied to their develop branch? Any insights or guidance on achieving this would be greatly appreciated
For example we had a branch policy named build validation, now I need list of repo which has the build validation branch policy.
Got a tough that we can achieve this via Rest api but I am not sure

You can get this using Azure DevOps Rest API. I would do this in the following way:
Create a $Desired_Policy argument as example to compare to (A repository you know that has the policies), you should use the following API to retrieve:
"{org_url}/_apis/policy/configurations?repositoryId={repo_id}&api-version=6.0"
Get all repositories using the following API:
"{org_url}/_apis/git/repositories?api-version=6.0"
Loop over all repositories from step 2 , get their branch policies as described in step 1 and compare to the desired example from step 1, the results you can add to an array that will store all similar repositories.
If you don't know, a "desired" example, you can go with a different implementation using the API's above.