pac org list behaviour #405
-
I have CLI installed. When I run "path auth clear" I see a file called tokencache_msalv3.dat gets deleted from my app folder. It seems this file is related to using MSAL library for autentication. Could it be that pac org list is using my local windows account in order to connect to my company tenant and get the the org list from there? Is the expected behaviour? It has nothing to do with the behaviour of the other PAC CLI commands. They tend to respect the pac org who. Is the source code of "pac org list" available? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
If you have no auth profile PAC CLI will try to use your Windows identity using MSAL's: Web Account Manager (WAM) |
Beta Was this translation helpful? Give feedback.
-
Trying to be clear. I am logged in my local workstation as [email protected] (windows user). In contoso.com I have access to several D365 environments. |
Beta Was this translation helpful? Give feedback.
It should work as petrochuk described, though there was a now-fixed bug in PAC at the time this was opened that could cause it to misbehave.
As part of our path to replacing the Dataverse and Admin AuthProfile
--kind
s with the Universal AuthProfile type, commands which used the Dataverse APIs (egpac org who
) would try to grab an active Auth Profile in the order Dataverse -> Universal -> Windows, stopping once it found a valid active auth profile. Likewise, Admin endpoints (egpac admin list
) would search for AuthProfile as Admin -> Universal -> Windows.The bug I mentioned was that
pac org list
was using the Admin search pattern instead of the expected Dataverse search pattern, so if you…