Hi @ Mahavir Saroj •
Thank you for reaching out Microsoft Q&A.
I understand that you are trying to automate the process of retrieving application registration credentials (such as the client ID and secret) stored in Azure Key Vault.
Before retrieving the credentials, ensure that the Azure Key Vault is already created and that the application registration credentials are stored as secrets within the Key Vault.
To automate the retrieval of client credentials, you should create an Azure Logic App that automates the creation and storage of client secrets.
For automating access to the Key Vault, authenticate using a Managed Identity.
Once the Logic App is set up with a Managed Identity, you can create a workflow to automatically rotate your Client Secret.
For additional information refer this link: Rotation tutorial for resources with one set of authentication credentials stored in Azure Key Vault | Microsoft Learn
Hope this helps. Do let us know if you have any further queries.
Regards,
Harshitha Eligeti.