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

I got below error when I launch it from Power shell. #2

Open
ghost opened this issue Dec 27, 2023 · 4 comments
Open

I got below error when I launch it from Power shell. #2

ghost opened this issue Dec 27, 2023 · 4 comments

Comments

@ghost
Copy link

ghost commented Dec 27, 2023

image

Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly 'file:///C:\Program
Files\WindowsPowerShell\Modules\AzureAD\2.0.2.182\Microsoft.IdentityModel.Clients.ActiveDirectory.dll' or one of its dependencies. The system cannot find the file specified."
At line:106 char:1

  • [System.Reflection.Assembly]::LoadFrom($adal) | Out-Null
  •   + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
      + FullyQualifiedErrorId : FileNotFoundException
    
    

Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly 'file:///C:\Program
Files\WindowsPowerShell\Modules\AzureAD\2.0.2.182\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll' or one of its dependencies. The system cannot find the file specified."
At line:108 char:1

  • [System.Reflection.Assembly]::LoadFrom($adalforms) | Out-Null
  •   + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
      + FullyQualifiedErrorId : FileNotFoundException
    
    

Cannot find type [Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext]: verify that the assembly containing this type is loaded.

@Sprsass
Copy link

Sprsass commented Dec 27, 2023

I also got same issue in windows 11 device.
image

@DanZab
Copy link
Owner

DanZab commented Jan 1, 2024

This script is based on the AppleDEPProfile_Assign.ps1 script found in the powershell-intune-samples repo.

Its using a deprecated Authentication module, so in order for this to continue working, you would need to install an older version of the AzureAD Module using the following command:

Install-Module -Name AzureAD -RequiredVersion 2.0.2.140

This same issue is reported on the original repo, issue 254.

@Sprsass
Copy link

Sprsass commented Jan 2, 2024

Thank You DanZeb.
I have installed the older version and it fix the above issue however encountered with new issue during profile assignment. Would you please help me on this as well. Please refer below screenshots for your reference.
image

@Sprsass
Copy link

Sprsass commented Jan 8, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants