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

MethodInvocationException Error #249

Open
4sa617 opened this issue May 29, 2023 · 3 comments
Open

MethodInvocationException Error #249

4sa617 opened this issue May 29, 2023 · 3 comments

Comments

@4sa617
Copy link

4sa617 commented May 29, 2023

I don't have a tremendous amount of experience with this sort of stuff, but after digging around for a few hours I was not able to find anyone with a similar error.

It appears when I attempt to run any script from (Powershell on linux), I am prompted with the request and then after inputing the UPN I get the following.
I don't recieve a popup.
I have run both the AzureAD and AzureADPreview module installs without error.
I am already logged into the tenant from a chrome browser.

IntuneScriptError

I saw that a file was missing from what I am getting from the error, but that file doesn't appear to be in any repository so I can only assume that it is created on login?
I also attempted this from a windows 10 Enterprise machine with the same error.
From the windows machine I am not logged in with a local account, rather an O365 account (if that makes a difference).

Is there a step that I am missing?
Any help would be greatly appriciated!

@afran1488
Copy link

You have to install an older version that includes the file that is missing. Run: Install-Module -Name AzureAD -RequiredVersion 2.0.2.140 -Force -AllowClobber
Even then, I think the JSON files have been removed from the location specified in the scripts.

@4sa617
Copy link
Author

4sa617 commented Jun 13, 2023

@afran1488 Thank you! I will have to play with it. I ended up using a different solution in the end, but maybe this will give someone a point in the right direction.

@josh-tasker
Copy link

You have to install an older version that includes the file that is missing. Run: Install-Module -Name AzureAD -RequiredVersion 2.0.2.140 -Force -AllowClobber Even then, I think the JSON files have been removed from the location specified in the scripts.

I was seeing the same issue and this worked for me, but I will just flag up for anyone else reading that I did have to manually uninstall the default version (2.0.2.180) for version .140 to actually be invoked by the scripts. Thanks for your help.

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

3 participants