Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS Sonoma - fatal: Object reference not set to an instance of an object. #1456

Open
gerritlansing opened this issue Nov 1, 2023 · 6 comments
Labels
auth:microsoft Specific to Microsoft AAD/MSA authentication auth-issue An issue authenticating to a host bug A bug in Git Credential Manager external Relating to an external partner, team, or library

Comments

@gerritlansing
Copy link

Version

2.3.2

Operating system

macOS

OS version or distribution

Sonoma 14.1 Intel

Git hosting provider(s)

Azure DevOps

Other hosting provider

No response

(Azure DevOps only) What format is your remote URL?

https://{org}@dev.azure.com/{org}

Can you access the remote repository directly in the browser?

Yes, I can access the repository

Expected behavior

I am able to authenticate to Azure DevOps.

Actual behavior

An exception "fatal: Object reference not set to an instance of an object." is thrown

Logs

08:20:13.047314 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/bin/git
08:20:13.048758 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/bin
08:20:13.052014 git.c:460 trace: built-in: git pull
08:20:13.054493 run-command.c:655 trace: run_command: git fetch --update-head-ok
08:20:13.062587 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:13.063986 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:13.065381 git.c:460 trace: built-in: git fetch --update-head-ok
08:20:13.073379 run-command.c:655 trace: run_command: GIT_DIR=.git git remote-https origin 'https://[redacted]@dev.azure.com/[redacted]/[redacted]/_git/[redacted]'
08:20:13.080571 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:13.081773 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:13.082717 git.c:750 trace: exec: git-remote-https origin 'https://[redacted]@dev.azure.com/[redacted]/[redacted]/_git/[redacted]'
08:20:13.082751 run-command.c:655 trace: run_command: git-remote-https origin 'https://[redacted]@dev.azure.com/[redacted]/[redacted]/_git/[redacted]'
08:20:13.091594 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git-remote-https
08:20:13.092992 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.093893 run-command.c:655 trace: run_command: '/usr/local/share/gcm-core/git-credential-manager get'
08:20:14.475862 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:14.477005 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.477954 git.c:460 trace: built-in: git config --null --list
08:20:14.643104 ...e/Application.cs:106 trace: [RunInternalAsync] Version: 2.3.2.0
08:20:14.645885 ...e/Application.cs:107 trace: [RunInternalAsync] Runtime: .NET 7.0.9
08:20:14.646144 ...e/Application.cs:108 trace: [RunInternalAsync] Platform: macOS (x86-64)
08:20:14.646211 ...e/Application.cs:109 trace: [RunInternalAsync] OSVersion: 14.1.0
08:20:14.646426 ...e/Application.cs:110 trace: [RunInternalAsync] AppPath: /usr/local/share/gcm-core/git-credential-manager
08:20:14.646802 ...e/Application.cs:111 trace: [RunInternalAsync] InstallDir: /usr/local/share/gcm-core/
08:20:14.646894 ...e/Application.cs:112 trace: [RunInternalAsync] Arguments: get
08:20:14.679147 ...GitCommandBase.cs:32 trace: [ExecuteAsync] Start 'get' command...
08:20:14.693554 ...GitCommandBase.cs:46 trace: [ExecuteAsync] Detecting host provider for input:
08:20:14.695735 ...GitCommandBase.cs:47 trace: [ExecuteAsync] protocol=https
08:20:14.695913 ...GitCommandBase.cs:47 trace: [ExecuteAsync] host=dev.azure.com
08:20:14.695942 ...GitCommandBase.cs:47 trace: [ExecuteAsync] path=[redacted]/[redacted]/_git/[redacted]
08:20:14.695960 ...GitCommandBase.cs:47 trace: [ExecuteAsync] username=[redacted]
08:20:14.701790 ...viderRegistry.cs:149 trace: [GetProviderAsync] Performing auto-detection of host provider.
08:20:14.702358 ...viderRegistry.cs:162 trace: [GetProviderAsync] Auto-detect probe timeout is 2 ms.
08:20:14.707669 ...viderRegistry.cs:170 trace: [GetProviderAsync] Checking against 4 host providers registered with priority 'Normal'.
08:20:14.709409 ...GitCommandBase.cs:49 trace: [ExecuteAsync] Host provider 'Azure Repos' was selected.
08:20:14.713783 ...osHostProvider.cs:84 trace: [GetCredentialAsync] Looking for existing credential in store with service=https://dev.azure.com/[redacted] account=...
08:20:14.737256 ...osHostProvider.cs:89 trace: [GetCredentialAsync] No existing credentials found.
08:20:14.737421 ...osHostProvider.cs:92 trace: [GetCredentialAsync] Creating new credential...
08:20:14.739677 ...sHostProvider.cs:194 trace: [GeneratePersonalAccessTokenAsync] Determining Microsoft Authentication Authority...
08:20:14.743053 ...eDevOpsRestApi.cs:43 trace: [GetAuthorityAsync] HTTP: HEAD https://dev.azure.com/[redacted]
08:20:14.753439 ...pClientFactory.cs:60 trace: [CreateClient] Creating new HTTP client instance...
08:20:14.772779 ...pClientFactory.cs:80 trace: [CreateClient] Git's SSL/TLS backend is: OpenSsl
08:20:14.792150 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:14.793650 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.794358 git.c:460 trace: built-in: git version
08:20:14.821635 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:14.822996 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.824104 git.c:460 trace: built-in: git config --null --type=path 'http.https://dev.azure.com/[redacted]/[redacted]/_git/[redacted].sslCAInfo'
08:20:14.835303 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:14.836776 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.837819 git.c:460 trace: built-in: git config --null --type=path 'http.dev.azure.com/[redacted]/[redacted]/_git/[redacted].sslCAInfo'
08:20:14.848680 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:14.850016 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.851069 git.c:460 trace: built-in: git config --null --type=path 'http.https://dev.azure.com/[redacted]/[redacted]/_git.sslCAInfo'
08:20:14.862522 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:14.863785 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.864553 git.c:460 trace: built-in: git config --null --type=path 'http.dev.azure.com/[redacted]/[redacted]/_git.sslCAInfo'
08:20:14.875800 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:14.876995 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.877857 git.c:460 trace: built-in: git config --null --type=path 'http.https://dev.azure.com/[redacted]/[redacted].sslCAInfo'
08:20:14.889309 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:14.890659 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.891599 git.c:460 trace: built-in: git config --null --type=path 'http.dev.azure.com/[redacted]/[redacted].sslCAInfo'
08:20:14.901779 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:14.902779 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.903625 git.c:460 trace: built-in: git config --null --type=path http.https://dev.azure.com/[redacted].sslCAInfo
08:20:14.914664 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:14.915860 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.916621 git.c:460 trace: built-in: git config --null --type=path http.dev.azure.com/[redacted].sslCAInfo
08:20:14.927709 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:14.928901 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.929754 git.c:460 trace: built-in: git config --null --type=path http.https://dev.azure.com.sslCAInfo
08:20:14.941099 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:14.942309 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.943120 git.c:460 trace: built-in: git config --null --type=path http.dev.azure.com.sslCAInfo
08:20:14.953661 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:14.954893 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.956094 git.c:460 trace: built-in: git config --null --type=path http.https://azure.com.sslCAInfo
08:20:14.966897 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:14.968147 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.968897 git.c:460 trace: built-in: git config --null --type=path http.azure.com.sslCAInfo
08:20:14.980133 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:14.981536 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.982566 git.c:460 trace: built-in: git config --null --type=path http.sslCAInfo
08:20:14.993762 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:14.994952 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:14.995749 git.c:460 trace: built-in: git config --null --type=path 'http.https://dev.azure.com/[redacted]/[redacted]/_git/[redacted].cookieFile'
08:20:15.008152 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:15.009229 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:15.010003 git.c:460 trace: built-in: git config --null --type=path 'http.dev.azure.com/[redacted]/[redacted]/_git/[redacted].cookieFile'
08:20:15.021284 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:15.022480 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:15.023463 git.c:460 trace: built-in: git config --null --type=path 'http.https://dev.azure.com/[redacted]/[redacted]/_git.cookieFile'
08:20:15.034030 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:15.035011 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:15.035741 git.c:460 trace: built-in: git config --null --type=path 'http.dev.azure.com/[redacted]/[redacted]/_git.cookieFile'
08:20:15.046450 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:15.047533 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:15.048352 git.c:460 trace: built-in: git config --null --type=path 'http.https://dev.azure.com/[redacted]/[redacted].cookieFile'
08:20:15.063303 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:15.065400 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:15.066257 git.c:460 trace: built-in: git config --null --type=path 'http.dev.azure.com/[redacted]/[redacted].cookieFile'
08:20:15.079357 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:15.080474 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:15.081253 git.c:460 trace: built-in: git config --null --type=path http.https://dev.azure.com/[redacted].cookieFile
08:20:15.095164 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:15.096393 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:15.097357 git.c:460 trace: built-in: git config --null --type=path http.dev.azure.com/[redacted].cookieFile
08:20:15.111524 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:15.112556 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:15.113286 git.c:460 trace: built-in: git config --null --type=path http.https://dev.azure.com.cookieFile
08:20:15.125293 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:15.126506 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:15.127699 git.c:460 trace: built-in: git config --null --type=path http.dev.azure.com.cookieFile
08:20:15.141296 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:15.142450 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:15.143524 git.c:460 trace: built-in: git config --null --type=path http.https://azure.com.cookieFile
08:20:15.155892 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:15.156879 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:15.157763 git.c:460 trace: built-in: git config --null --type=path http.azure.com.cookieFile
08:20:15.169386 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:15.170461 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:15.171819 git.c:460 trace: built-in: git config --null --type=path http.cookieFile
08:20:16.450277 ...eDevOpsRestApi.cs:46 trace: [GetAuthorityAsync] HTTP: Response code ignored.
08:20:16.450458 ...eDevOpsRestApi.cs:47 trace: [GetAuthorityAsync] Inspecting headers...
08:20:16.476735 ...eDevOpsRestApi.cs:54 trace: [GetAuthorityAsync] Found WWW-Authenticate header with Bearer authority 'https://login.microsoftonline.com/097499ff-179d-4959-ab02-86d364125bfc'.
08:20:16.477190 ...sHostProvider.cs:196 trace: [GeneratePersonalAccessTokenAsync] Authority is 'https://login.microsoftonline.com/097499ff-179d-4959-ab02-86d364125bfc'.
08:20:16.477249 ...sHostProvider.cs:199 trace: [GeneratePersonalAccessTokenAsync] Getting Azure AD access token...
08:20:16.487989 ...Authentication.cs:67 trace: [GetTokenAsync] OS broker is not available or enabled.
08:20:16.488078 ...Authentication.cs:73 trace: [GetTokenAsync] MSA passthrough is enabled.
08:20:16.516044 ...uthentication.cs:427 trace: [RegisterTokenCacheAsync] Configuring Microsoft Authentication token cache to instance shared with Microsoft developer tools...
08:20:16.599904 ...uthentication.cs:483 trace: [RegisterTokenCacheAsync] Microsoft developer tools token cache configured.
08:20:16.602937 ...uthentication.cs:170 trace: [GetTokenAsync] Performing interactive auth with system web view...
08:20:16.643589 ...pClientFactory.cs:60 trace: [CreateClient] Creating new HTTP client instance...
08:20:16.643926 ...pClientFactory.cs:80 trace: [CreateClient] Git's SSL/TLS backend is: OpenSsl
08:20:16.655725 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.656657 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.657361 git.c:460 trace: built-in: git config --null --type=path 'http.https://dev.azure.com/[redacted]/[redacted]/_git/[redacted].sslCAInfo'
08:20:16.669345 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.670590 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.671493 git.c:460 trace: built-in: git config --null --type=path 'http.dev.azure.com/[redacted]/[redacted]/_git/[redacted].sslCAInfo'
08:20:16.683531 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.684832 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.685617 git.c:460 trace: built-in: git config --null --type=path 'http.https://dev.azure.com/[redacted]/[redacted]/_git.sslCAInfo'
08:20:16.697742 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.698870 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.699565 git.c:460 trace: built-in: git config --null --type=path 'http.dev.azure.com/[redacted]/[redacted]/_git.sslCAInfo'
08:20:16.711361 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.712634 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.713581 git.c:460 trace: built-in: git config --null --type=path 'http.https://dev.azure.com/[redacted]/[redacted].sslCAInfo'
08:20:16.725685 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.726740 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.727732 git.c:460 trace: built-in: git config --null --type=path 'http.dev.azure.com/[redacted]/[redacted].sslCAInfo'
08:20:16.739344 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.740387 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.741186 git.c:460 trace: built-in: git config --null --type=path http.https://dev.azure.com/[redacted].sslCAInfo
08:20:16.753746 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.755102 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.755907 git.c:460 trace: built-in: git config --null --type=path http.dev.azure.com/[redacted].sslCAInfo
08:20:16.768072 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.769029 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.770528 git.c:460 trace: built-in: git config --null --type=path http.https://dev.azure.com.sslCAInfo
08:20:16.781908 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.783191 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.784088 git.c:460 trace: built-in: git config --null --type=path http.dev.azure.com.sslCAInfo
08:20:16.796680 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.798121 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.798932 git.c:460 trace: built-in: git config --null --type=path http.https://azure.com.sslCAInfo
08:20:16.810946 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.812372 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.813221 git.c:460 trace: built-in: git config --null --type=path http.azure.com.sslCAInfo
08:20:16.826159 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.827236 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.828015 git.c:460 trace: built-in: git config --null --type=path http.sslCAInfo
08:20:16.841222 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.842279 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.843018 git.c:460 trace: built-in: git config --null --type=path 'http.https://dev.azure.com/[redacted]/[redacted]/_git/[redacted].cookieFile'
08:20:16.854848 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.856177 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.856926 git.c:460 trace: built-in: git config --null --type=path 'http.dev.azure.com/[redacted]/[redacted]/_git/[redacted].cookieFile'
08:20:16.869649 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.870785 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.871879 git.c:460 trace: built-in: git config --null --type=path 'http.https://dev.azure.com/[redacted]/[redacted]/_git.cookieFile'
08:20:16.884852 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.886380 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.887502 git.c:460 trace: built-in: git config --null --type=path 'http.dev.azure.com/[redacted]/[redacted]/_git.cookieFile'
08:20:16.899523 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.900857 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.901678 git.c:460 trace: built-in: git config --null --type=path 'http.https://dev.azure.com/[redacted]/[redacted].cookieFile'
08:20:16.914649 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.915699 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.916470 git.c:460 trace: built-in: git config --null --type=path 'http.dev.azure.com/[redacted]/[redacted].cookieFile'
08:20:16.929280 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.930355 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.931439 git.c:460 trace: built-in: git config --null --type=path http.https://dev.azure.com/[redacted].cookieFile
08:20:16.944976 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.946297 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.947283 git.c:460 trace: built-in: git config --null --type=path http.dev.azure.com/[redacted].cookieFile
08:20:16.960329 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.961295 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.962021 git.c:460 trace: built-in: git config --null --type=path http.https://dev.azure.com.cookieFile
08:20:16.975912 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.977030 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.978252 git.c:460 trace: built-in: git config --null --type=path http.dev.azure.com.cookieFile
08:20:16.991254 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:16.992600 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:16.993510 git.c:460 trace: built-in: git config --null --type=path http.https://azure.com.cookieFile
08:20:17.006374 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:17.007362 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:17.008382 git.c:460 trace: built-in: git config --null --type=path http.azure.com.cookieFile
08:20:17.022115 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/libexec/git-core/git
08:20:17.023185 exec-cmd.c:238 trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/libexec/git-core
08:20:17.024034 git.c:460 trace: built-in: git config --null --type=path http.cookieFile
fatal: Object reference not set to an instance of an object.
at Microsoft.Identity.Client.PlatformsCommon.Shared.CommonCryptographyManager.SignWithCertificate(String message, X509Certificate2 certificate)
at Microsoft.Identity.Client.Platforms.netcore.NetCoreDeviceAuthManager.SignWithCertificate(DeviceAuthJWTResponse responseJwt, X509Certificate2 certificate)
at Microsoft.Identity.Client.PlatformsCommon.Shared.DeviceAuthManager.TryCreateDeviceAuthChallengeResponse(HttpResponseHeaders responseHeaders, Uri endpointUri, String& responseHeader)
at Microsoft.Identity.Client.OAuth2.TokenClient.SendHttpAndClearTelemetryAsync(String tokenEndpoint, ILoggerAdapter logger)
at Microsoft.Identity.Client.OAuth2.TokenClient.SendTokenRequestAsync(IDictionary`2 additionalBodyParameters, String scopeOverride, String tokenEndpointOverride, CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.GetTokenResponseAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.ExecuteAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.ApiConfig.Executors.PublicClientExecutor.ExecuteAsync(AcquireTokenCommonParameters commonParameters, AcquireTokenInteractiveParameters interactiveParameters, CancellationToken cancellationToken)
at GitCredentialManager.Authentication.MicrosoftAuthentication.GetTokenAsync(String authority, String clientId, Uri redirectUri, String[] scopes, String userName, Boolean msaPt)
at Microsoft.AzureRepos.AzureReposHostProvider.GeneratePersonalAccessTokenAsync(InputArguments input)
at Microsoft.AzureRepos.AzureReposHostProvider.GetCredentialAsync(InputArguments input)
at GitCredentialManager.Commands.GetCommand.ExecuteInternalAsync(InputArguments input, IHostProvider provider)
at GitCredentialManager.Commands.GitCommandBase.ExecuteAsync()
at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass15_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<b__0>d.MoveNext()

@gerritlansing gerritlansing added the auth-issue An issue authenticating to a host label Nov 1, 2023
@mjcheetham
Copy link
Collaborator

@gerritlansing, thank you for opening this issue and including the trace!

This stack trace indicates the null reference exception is being thrown inside of MSAL (the Microsoft authentication library).

fatal: Object reference not set to an instance of an object.
at Microsoft.Identity.Client.PlatformsCommon.Shared.CommonCryptographyManager.SignWithCertificate(String message, X509Certificate2 certificate)
at Microsoft.Identity.Client.Platforms.netcore.NetCoreDeviceAuthManager.SignWithCertificate(DeviceAuthJWTResponse responseJwt, X509Certificate2 certificate)
at Microsoft.Identity.Client.PlatformsCommon.Shared.DeviceAuthManager.TryCreateDeviceAuthChallengeResponse(HttpResponseHeaders responseHeaders, Uri endpointUri, String& responseHeader)
at Microsoft.Identity.Client.OAuth2.TokenClient.SendHttpAndClearTelemetryAsync(String tokenEndpoint, ILoggerAdapter logger)
at Microsoft.Identity.Client.OAuth2.TokenClient.SendTokenRequestAsync(IDictionary`2 additionalBodyParameters, String scopeOverride, String tokenEndpointOverride, CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.GetTokenResponseAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.ExecuteAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.ApiConfig.Executors.PublicClientExecutor.ExecuteAsync(AcquireTokenCommonParameters commonParameters, AcquireTokenInteractiveParameters interactiveParameters, CancellationToken cancellationToken)
at GitCredentialManager.Authentication.MicrosoftAuthentication.GetTokenAsync(String authority, String clientId, Uri redirectUri, String[] scopes, String userName, Boolean msaPt)

If you can still reproduce this, please can you enable one more trace variable to capture the internal logs of MSAL?

GCM_TRACE=1
GCM_TRACE_MSAUTH=1

@bgavrilMS the version of MSAL in this version of GCM is 4.54.0. The throwing method in that version is:

/// <remarks>AAD only supports RSA certs for client credentials </remarks>
public virtual byte[] SignWithCertificate(string message, X509Certificate2 certificate)
{
    // MSAL used to check min key size by looking at certificate.GetRSAPublicKey().KeySize
    // but this causes sporadic failures in the crypto stack. Rely on AAD to perform key size validations.

    if (!s_certificateToRsaMap.TryGetValue(certificate.Thumbprint, out RSA rsa))
    {
        if (s_certificateToRsaMap.Count >= s_maximumMapSize)
            s_certificateToRsaMap.Clear();

        rsa = certificate.GetRSAPrivateKey();
    }

    var signedData = rsa.SignData(Encoding.UTF8.GetBytes(message), HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);

    // Cache only valid RSA crypto providers, which are able to sign data successfully
    s_certificateToRsaMap[certificate.Thumbprint] = rsa;
    return signedData;

}

https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/390a6d66a73995c2e719ad05d9ea510805cf1350/src/client/Microsoft.Identity.Client/PlatformsCommon/Shared/CommonCryptographyManager.cs#L56-L76

Looks like the only ways an NRE could be thrown is if rsa is null, which means there was no private key available on the certificate?

s_certificateToRsaMap is statically assigned and certificate should not be null at this point in the stack.

@mjcheetham mjcheetham added bug A bug in Git Credential Manager auth:microsoft Specific to Microsoft AAD/MSA authentication external Relating to an external partner, team, or library labels Nov 1, 2023
@gerritlansing
Copy link
Author

Hi @mjcheetham, thanks for the response. It reproduces every time and on any repo in the Azure DevOps organization.

Using latest Firefox here. Browser workflow seems normal and completes with this:

image

Logs as requested:

12:22:43.552779 ...e/Application.cs:106 trace: [RunInternalAsync] Version: 2.3.2.0
12:22:43.554740 ...e/Application.cs:107 trace: [RunInternalAsync] Runtime: .NET 7.0.9
12:22:43.554881 ...e/Application.cs:108 trace: [RunInternalAsync] Platform: macOS (x86-64)
12:22:43.554899 ...e/Application.cs:109 trace: [RunInternalAsync] OSVersion: 14.1.0
12:22:43.554957 ...e/Application.cs:110 trace: [RunInternalAsync] AppPath: /usr/local/share/gcm-core/git-credential-manager
12:22:43.555158 ...e/Application.cs:111 trace: [RunInternalAsync] InstallDir: /usr/local/share/gcm-core/
12:22:43.555240 ...e/Application.cs:112 trace: [RunInternalAsync] Arguments: get
12:22:43.588186 ...GitCommandBase.cs:32 trace: [ExecuteAsync] Start 'get' command...
12:22:43.605243 ...GitCommandBase.cs:46 trace: [ExecuteAsync] Detecting host provider for input:
12:22:43.607418 ...GitCommandBase.cs:47 trace: [ExecuteAsync]   protocol=https
12:22:43.607685 ...GitCommandBase.cs:47 trace: [ExecuteAsync]   host=dev.azure.com
12:22:43.607729 ...GitCommandBase.cs:47 trace: [ExecuteAsync]   path=[redacted]/[redacted]/_git/[redacted]
12:22:43.607747 ...GitCommandBase.cs:47 trace: [ExecuteAsync]   username=[redacted]
12:22:43.614284 ...viderRegistry.cs:149 trace: [GetProviderAsync] Performing auto-detection of host provider.
12:22:43.615159 ...viderRegistry.cs:162 trace: [GetProviderAsync] Auto-detect probe timeout is 2 ms.
12:22:43.620384 ...viderRegistry.cs:170 trace: [GetProviderAsync] Checking against 4 host providers registered with priority 'Normal'.
12:22:43.622364 ...GitCommandBase.cs:49 trace: [ExecuteAsync] Host provider 'Azure Repos' was selected.
12:22:43.626972 ...osHostProvider.cs:84 trace: [GetCredentialAsync] Looking for existing credential in store with service=https://dev.azure.com/[redacted] account=...
12:22:43.651721 ...osHostProvider.cs:89 trace: [GetCredentialAsync] No existing credentials found.
12:22:43.651833 ...osHostProvider.cs:92 trace: [GetCredentialAsync] Creating new credential...
12:22:43.653237 ...sHostProvider.cs:194 trace: [GeneratePersonalAccessTokenAsync] Determining Microsoft Authentication Authority...
12:22:43.656408 ...eDevOpsRestApi.cs:43 trace: [GetAuthorityAsync] HTTP: HEAD https://dev.azure.com/[redacted]
12:22:43.667914 ...pClientFactory.cs:60 trace: [CreateClient] Creating new HTTP client instance...
12:22:43.685266 ...pClientFactory.cs:80 trace: [CreateClient] Git's SSL/TLS backend is: OpenSsl
12:22:44.574789 ...eDevOpsRestApi.cs:46 trace: [GetAuthorityAsync] HTTP: Response code ignored.
12:22:44.574901 ...eDevOpsRestApi.cs:47 trace: [GetAuthorityAsync] Inspecting headers...
12:22:44.592626 ...eDevOpsRestApi.cs:54 trace: [GetAuthorityAsync] Found WWW-Authenticate header with Bearer authority 'https://login.microsoftonline.com/097499ff-179d-4959-ab02-86d364125bfc'.
12:22:44.593025 ...sHostProvider.cs:196 trace: [GeneratePersonalAccessTokenAsync] Authority is 'https://login.microsoftonline.com/097499ff-179d-4959-ab02-86d364125bfc'.
12:22:44.593071 ...sHostProvider.cs:199 trace: [GeneratePersonalAccessTokenAsync] Getting Azure AD access token...
12:22:44.602674 ...Authentication.cs:67 trace: [GetTokenAsync] OS broker is not available or enabled.
12:22:44.602789 ...Authentication.cs:73 trace: [GetTokenAsync] MSA passthrough is enabled.
12:22:44.631978 ...uthentication.cs:427 trace: [RegisterTokenCacheAsync] Configuring Microsoft Authentication token cache to instance shared with Microsoft developer tools...
12:22:45.029315 ...uthentication.cs:483 trace: [RegisterTokenCacheAsync] Microsoft developer tools token cache configured.
12:22:45.032640 ...uthentication.cs:170 trace: [GetTokenAsync] Performing interactive auth with system web view...
12:22:45.044574 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] MSAL MSAL.NetCore with assembly version '4.54.0.0'. CorrelationId(9b31a882-852c-4e0d-9be1-595153164b9e)
12:22:45.057576 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] DefaultBrowserOptions configured
12:22:45.057905 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] HtmlMessageSuccess? False
12:22:45.058094 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] HtmlMessageError? False
12:22:45.058298 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] BrowserRedirectSuccess? False
12:22:45.058577 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] BrowserRedirectError? False
12:22:45.058844 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] HidePrivacyPrompt False
12:22:45.058911 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] === InteractiveParameters Data ===
LoginHint provided: False
User provided: False
UseEmbeddedWebView: System
ExtraScopesToConsent: 
Prompt: select_account
HasCustomWebUi: False

12:22:45.063784 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] 
=== Request Data ===
Authority Provided? - True
Scopes - 499b84ac-1321-427f-aa17-267ca6975798/.default
Extra Query Params Keys (space separated) - 
ApiId - AcquireTokenInteractive
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - 9b31a882-852c-4e0d-9be1-595153164b9e
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured: 

12:22:45.064585 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] === Token Acquisition (InteractiveRequest) started:
         Scopes: 499b84ac-1321-427f-aa17-267ca6975798/.default
        Authority Host: login.microsoftonline.com
12:22:45.069433 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] [Instance Discovery] Instance discovery is enabled and will be performed
12:22:45.071014 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] [Region discovery] Not using a regional authority. 
12:22:45.073740 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] [Instance Discovery] Tried to use network cache provider for login.microsoftonline.com. Success? False. 
12:22:45.076162 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Fetching instance discovery from the network from host login.microsoftonline.com. 
12:22:45.082200 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Starting [Oauth2Client] Sending GET request 
12:22:45.085201 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Starting [HttpManager] ExecuteAsync
12:22:45.087507 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:45Z - 9b31a882-852c-4e0d-9be1-595153164b9e] [HttpManager] Sending request. Method: GET. Host: https://login.microsoftonline.com. 
12:22:45.087992 ...pClientFactory.cs:60 trace: [CreateClient] Creating new HTTP client instance...
12:22:45.088453 ...pClientFactory.cs:80 trace: [CreateClient] Git's SSL/TLS backend is: OpenSsl
12:22:46.018250 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:46Z - 9b31a882-852c-4e0d-9be1-595153164b9e] [HttpManager] Received response. Status code: OK. 
12:22:46.021858 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:46Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Finished [HttpManager] ExecuteAsync in 936 ms
12:22:46.023424 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:46Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Finished [Oauth2Client] Sending GET request  in 941 ms
12:22:46.025666 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:46Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Starting [OAuth2Client] Deserializing response
12:22:46.069562 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:46Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Finished [OAuth2Client] Deserializing response in 43 ms
12:22:46.072426 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:46Z - 9b31a882-852c-4e0d-9be1-595153164b9e] [Instance Discovery] Tried to use network cache provider for login.microsoftonline.com. Success? True. 
12:22:46.072673 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:46Z - 9b31a882-852c-4e0d-9be1-595153164b9e] [Instance Discovery] After hitting the discovery endpoint, the network provider found an entry for login.microsoftonline.com ? True. 
12:22:46.077733 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:46Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Authority validation enabled? True. 
12:22:46.077986 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:46Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Authority validation - is known env? True. 
12:22:46.082617 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:46Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Using system browser.
12:22:46.124611 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:46Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Listening for authorization code on http://localhost:54041/
12:22:49.470945 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Processing a response message to the browser. HttpStatus:OK
12:22:49.472737 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] HttpListner received a message on http://localhost:54041/
12:22:49.498742 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] An authorization code was retrieved from the /authorize endpoint. 
12:22:49.499207 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Exchanging the auth code for tokens. 
12:22:49.500743 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] DefaultBrowserOptions configured
12:22:49.500838 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] HtmlMessageSuccess? False
12:22:49.500880 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] HtmlMessageError? False
12:22:49.500912 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] BrowserRedirectSuccess? False
12:22:49.500974 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] BrowserRedirectError? False
12:22:49.501010 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] HidePrivacyPrompt False
12:22:49.501085 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] === InteractiveParameters Data ===
LoginHint provided: False
User provided: False
UseEmbeddedWebView: System
ExtraScopesToConsent: 
Prompt: select_account
HasCustomWebUi: False

12:22:49.509332 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Starting TokenClient:SendTokenRequestAsync
12:22:49.525963 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] [Token Client] Fetching MsalTokenResponse .... 
12:22:49.527133 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Starting [Oauth2Client] Sending POST request 
12:22:49.531976 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Starting [HttpManager] ExecuteAsync
12:22:49.532118 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] [HttpManager] Sending request. Method: POST. Host: https://login.microsoftonline.com. 
12:22:49.737237 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] [HttpManager] Received response. Status code: Unauthorized. 
12:22:49.737730 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Finished [HttpManager] ExecuteAsync in 205 ms
12:22:49.738763 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Response status code does not indicate success: 401 (Unauthorized). 
12:22:49.739323 ...uthentication.cs:548 trace: [MSAL] [Warning] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Request retry failed.
12:22:49.742727 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Finished [Oauth2Client] Sending POST request  in 215 ms
12:22:49.743917 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] [Oauth2Client] Processing error response 
12:22:49.789996 ...uthentication.cs:548 trace: [MSAL] [Info] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] HttpStatusCode: 401: Unauthorized
12:22:49.803565 ...uthentication.cs:548 trace: [MSAL] [Error] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] === Token Acquisition (1005) failed.
        Host: login.microsoftonline.com.
12:22:49.804792 ...uthentication.cs:548 trace: [MSAL] [Error] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Exception type: Microsoft.Identity.Client.MsalUiRequiredException
, ErrorCode: invalid_grant
HTTP StatusCode 401
CorrelationId 9b31a882-852c-4e0d-9be1-595153164b9e

12:22:49.832385 ...uthentication.cs:548 trace: [MSAL] [Verbose] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Finished TokenClient:SendTokenRequestAsync in 323 ms
12:22:49.855274 ...uthentication.cs:548 trace: [MSAL] [Error] False MSAL 4.54.0.0 MSAL.NetCore .NET 7.0.9 Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 [2023-11-01 16:22:49Z - 9b31a882-852c-4e0d-9be1-595153164b9e] Exception type: System.NullReferenceException

   at Microsoft.Identity.Client.PlatformsCommon.Shared.CommonCryptographyManager.SignWithCertificate(String message, X509Certificate2 certificate)
   at Microsoft.Identity.Client.Platforms.netcore.NetCoreDeviceAuthManager.SignWithCertificate(DeviceAuthJWTResponse responseJwt, X509Certificate2 certificate)
   at Microsoft.Identity.Client.PlatformsCommon.Shared.DeviceAuthManager.TryCreateDeviceAuthChallengeResponse(HttpResponseHeaders responseHeaders, Uri endpointUri, String& responseHeader)
   at Microsoft.Identity.Client.OAuth2.TokenClient.SendHttpAndClearTelemetryAsync(String tokenEndpoint, ILoggerAdapter logger)
   at Microsoft.Identity.Client.OAuth2.TokenClient.SendTokenRequestAsync(IDictionary`2 additionalBodyParameters, String scopeOverride, String tokenEndpointOverride, CancellationToken cancellationToken)
   at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.GetTokenResponseAsync(CancellationToken cancellationToken)
   at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.ExecuteAsync(CancellationToken cancellationToken)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)
fatal: Object reference not set to an instance of an object.
   at Microsoft.Identity.Client.PlatformsCommon.Shared.CommonCryptographyManager.SignWithCertificate(String message, X509Certificate2 certificate)
   at Microsoft.Identity.Client.Platforms.netcore.NetCoreDeviceAuthManager.SignWithCertificate(DeviceAuthJWTResponse responseJwt, X509Certificate2 certificate)
   at Microsoft.Identity.Client.PlatformsCommon.Shared.DeviceAuthManager.TryCreateDeviceAuthChallengeResponse(HttpResponseHeaders responseHeaders, Uri endpointUri, String& responseHeader)
   at Microsoft.Identity.Client.OAuth2.TokenClient.SendHttpAndClearTelemetryAsync(String tokenEndpoint, ILoggerAdapter logger)
   at Microsoft.Identity.Client.OAuth2.TokenClient.SendTokenRequestAsync(IDictionary`2 additionalBodyParameters, String scopeOverride, String tokenEndpointOverride, CancellationToken cancellationToken)
   at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.GetTokenResponseAsync(CancellationToken cancellationToken)
   at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.ExecuteAsync(CancellationToken cancellationToken)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)
   at Microsoft.Identity.Client.ApiConfig.Executors.PublicClientExecutor.ExecuteAsync(AcquireTokenCommonParameters commonParameters, AcquireTokenInteractiveParameters interactiveParameters, CancellationToken cancellationToken)
   at GitCredentialManager.Authentication.MicrosoftAuthentication.GetTokenAsync(String authority, String clientId, Uri redirectUri, String[] scopes, String userName, Boolean msaPt)
   at Microsoft.AzureRepos.AzureReposHostProvider.GeneratePersonalAccessTokenAsync(InputArguments input)
   at Microsoft.AzureRepos.AzureReposHostProvider.GetCredentialAsync(InputArguments input)
   at GitCredentialManager.Commands.GetCommand.ExecuteInternalAsync(InputArguments input, IHostProvider provider)
   at GitCredentialManager.Commands.GitCommandBase.ExecuteAsync()
   at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass15_0.<<AddMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()

@bgavrilMS
Copy link

Yeah, this is not great. It's an MSAL bug. What is happening is:

  • auth code flow occurs
  • MSAL gets an auth code
  • MSAL tries to get a token from the auth code
  • AAD notices that MSAL is capable of device auth (MSAL sends a header to denote this)
  • AAD asks MSAL to send a challenge signed with the device code
  • MSAL fails because it can't find the cert

This flow is only supposed to work on older versions of Windows, not on Mac. It may be that AAD added this logic on Mac. Needs a relatively simple fix on Mac.

@bgavrilMS
Copy link

I recommend moving this bug to MSAL .NET

@bgavrilMS
Copy link

@gerritlansing - did you install Company Portal on Mac? It is a managed device?

@gerritlansing
Copy link
Author

@bgavrilMS It was previously a managed device, but was unenrolled when the company switched MDMs. Is managed by a different solution now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth:microsoft Specific to Microsoft AAD/MSA authentication auth-issue An issue authenticating to a host bug A bug in Git Credential Manager external Relating to an external partner, team, or library
Projects
None yet
Development

No branches or pull requests

3 participants