-
Notifications
You must be signed in to change notification settings - Fork 30
New-MsalClientApplication : Cannot convert argument "builder" #68
Comments
same problem ... any suggestions please? |
same problem, MSAL.ps version 4.35.1.3 |
The explanation is simple. I have no idea about a structural solution that will keep working. GAC Version Location False v4.0.30319 C:\Program Files\WindowsPowerShell\Modules\msal.ps\4.37.0.0\Microsoft.Identity.Client.4.37.0\net45\Microsoft.Identity.Client.dll import-module microsoft.graph.authentication GAC Version Location False v4.0.30319 C:\Program Files\WindowsPowerShell\Modules\microsoft.graph.authentication\1.28.0\Dependencies\Desktop\Microsoft.Identity.Client.dll Here it appears to work by simply switching the order. I don't know if there are any side effects. Some indications of better solutions are in here. (Basically it says "don't run both assemblies in same process".) |
Had the same issue; in my case it looks like it is caused when using webview2 for interactive login. Adding the lines below to my script (i.e. not changing the module code) fixed the issue so the popup browser window for auth. is displayed. Not pretty...suggest that an option is added to allow disabling use of webview2. import-module msal.ps |
Hello,
I was able to successfully send this command:
Connect-MgGraph
$Current_MgContext = Get-MgContext
$Global:AccessToken = Get-MsalToken -ClientID $Current_MgContext.ClientId -TenantId $Current_MgContext.TenantId
but then suddenly i have this persistent error:
New-MsalClientApplication : Cannot convert argument "builder", with value:
"Microsoft.Identity.Client.PublicClientApplicationBuilder", for "WithDesktopFeatures" to type
"Microsoft.Identity.Client.PublicClientApplicationBuilder": "Cannot convert the
"Microsoft.Identity.Client.PublicClientApplicationBuilder" value of type
"Microsoft.Identity.Client.PublicClientApplicationBuilder" to type
"Microsoft.Identity.Client.PublicClientApplicationBuilder"."
At C:\Program Files\WindowsPowerShell\Modules\MSAL.PS\4.37.0.0\Select-MsalClientApplication.ps1:56 char:29
But this error is machine dependent, on another PC it runs fine.
The text was updated successfully, but these errors were encountered: