soteria-security / 365Inspect

A PowerShell script that automates the security assessment of Microsoft 365 environments.
https://soteria.io/solutions/soteria-inspect/
MIT License
561 stars 105 forks source link

Error executing main script #82

Closed cyberninja365 closed 7 months ago

cyberninja365 commented 7 months ago

I get the following error once I get to sharepoint

Connecting to SharePoint Service Connecting to SharePoint Service Failed. Write-Error: C:\temp\365Inspect-main\365Inspect.ps1:387 Line | 387 | Connect-Services | ~~~~ | Could not load file or assembly 'Microsoft.Identity.Client, Version=4.50.0.0, Culture=neutral, | PublicKeyToken=0a613f4dd989e8ae'. Could not find or load a specific file. (0x80131621)

ThoughtContagion commented 7 months ago

Which method are you using to connect? MFA or App?

cyberninja365 commented 7 months ago

MFA

cyberninja365 commented 7 months ago

@ThoughtContagion I found a copy on another VM from back in Oct 2023 - and that version worked with no issues.

ThoughtContagion commented 7 months ago

Do you have PnP PowerShell installed or the older SharePoint PowerShell module?

If using PnP.PowerShell, which version is installed? PowerShell 5.1 requires PnP.PowerShell 1.12.0 or lower. 2.0+ requires PowerShell 7+.

Dependencies have changed since the version that was available in October with the added Application Authentication feature.

ThoughtContagion commented 7 months ago

Closing due to inactivity. If this problem persists, please feel free to reopen with the error message and any additional context you feel is helpful.

ThoughtContagion commented 7 months ago

We were able to resolve this in another issue ticket