@greg schlitt That is Awesome, I'm glad that you were able to resolve your issue and very much appreciate for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.
Issue: you are trying to authenticate external users in an Entra external tenant to an Azure SQL DB. You have followed the instructions in the Microsoft documentation but are encountering an error when trying to connect to the database. The error message is "Login failed for token-identified principal".
Solution: As you mentioned you needed to remove "Authentication = Active Directory Default" , move the definition of authResult outside of SignInButton_Click so it's accessible in ContactDB_Click, in that method use conn.AccessToken = authResult.AccessToken; and include a new scope in s_scopes (not shown in the original question text) via
string[] scopes = new string[] { "https://database.windows.net//.default" };
If you have any other questions or are still running into more issues, please let me know.
Please remember to "Accept Answer"so that others in the community facing similar issues can easily find the solution.
Regards
Geetha