M365Documentation icon indicating copy to clipboard operation
M365Documentation copied to clipboard

Cannot connect using Connect-M365Doc

Open kcswe opened this issue 3 years ago • 0 comments

I just tried installing and then connecting, but I get an error message like below:

New-MsalClientApplication : Cannot convert argument "builder", with value: "Microsoft.Identity.Client.PublicClientAppli

cationBuilder", for "WithDesktopFeatures" to type "Microsoft.Identity.Client.PublicClientApplicationBuilder": "Cannot c onvert the "Microsoft.Identity.Client.PublicClientApplicationBuilder" value of type "Microsoft.Identity.Client.PublicCl ientApplicationBuilder" to type "Microsoft.Identity.Client.PublicClientApplicationBuilder"." At C:\Program Files\WindowsPowerShell\Modules\MSAL.PS\4.37.0.0\Select-MsalClientApplication.ps1:56 char:29

  • ... plication = New-MsalClientApplication -ErrorAction Stop @paramNewMsal ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [New-MsalClientApplication], MethodException
    • FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument,New-MsalClientApplication

The property 'AppConfig' cannot be found on this object. Verify that the property exists. At C:\Program Files\WindowsPowerShell\Modules\MSAL.PS\4.37.0.0\Select-MsalClientApplication.ps1:88 char:9

  •     Write-Debug ('Adding Application with ClientId [{0}] and Redi ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
    • FullyQualifiedErrorId : PropertyNotFoundStrict

Add-MsalClientApplication : Cannot bind argument to parameter 'PublicClientApplication' because it is null. At C:\Program Files\WindowsPowerShell\Modules\MSAL.PS\4.37.0.0\Select-MsalClientApplication.ps1:89 char:35

  •     Add-MsalClientApplication $ClientApplication
    
  •                               ~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Add-MsalClientApplication], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Add-MsalClientApplication

The property 'ClientId' cannot be found on this object. Verify that the property exists. At C:\Program Files\WindowsPowerShell\Modules\MSAL.PS\4.37.0.0\Get-MsalToken.ps1:291 char:21

  • ... Write-Verbose ('Attempting Silent Authentication to Appli ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
    • FullyQualifiedErrorId : PropertyNotFoundStrict

Get-MsalToken : Cannot bind argument to parameter 'PublicClientApplication' because it is null. At C:\Program Files\WindowsPowerShell\Modules\MSAL.PS\4.37.0.0\Get-MsalToken.ps1:293 char:96

  • ... ken -Silent -PublicClientApplication $PublicClientApplication @paramG ...
  •                                      ~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Get-MsalToken], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-MsalToken

Environment is Windows 11 Enterprise and PSVersion 5.1.22000.653

kcswe avatar Aug 04 '22 08:08 kcswe