To debug against Azure (e.g. getting access to Key Vault etc.) configure Visual Studio to use the account with which it uses to send credentials to Azure.
This configuration is under: Options => Azure Service Authentication => Account Selection
References:
https://docs.microsoft.com/en-us/azure/azure-app-configuration/howto-integrate-azure-managed-service-identity?tabs=core2x
https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview