I recently migrated my azure functions project from .net core 3.1 to .net 6 and thus, to VS 2022. I am using the Nuget Azure.Identity package to authenticate to other azure services. When running my app from windows terminal, I can choose the right subscription/tenant using
az account set -s oneOfMySubs
. Then, the defaultcredential class in my code picks up the correct CLI credential from the chain as expected from MS documentation.
However, when debugging my app inside VS, I am getting error message
Login failed for user '<token-identified principal>'. The server is not currently configured to accept this token.
I suspect, that VS picks up my account's default subscription, which is not the one I am running my connected services in.
How can I change the used subscription context within VS 2022?
As it seems MS has retired the Azure node in Server Explorer, , I see no chance to do so.