The new version of git credential manager is super smart and is able to use ADFS cached tokens. Unfortunately when you have multiple identities for the same tenant and one of them is a full VSTO user and the other a stakeholder interesting things happen when one credential is used instead of the other. For exmaple trying to push to your repo you can get TF401019: The Git repository with name or identifier Powershell scripts does not exist or you do not have permissions for the operation you are attempting or something similar. Enabling GCM and GIT tracing (SET GCM_TRACE=1 SET GIT_TRACE=1) shows that GCM perform a non interactive authentication.
To get rid of this situation just run:
- git credential-manager clear [url] (example https://progelspa.visualstudio.com)
- git config –local credential.visualstudio.com.interactive Always