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

Cannot find an overload for "AcquireTokenWithDeviceCode" and the argument count: "2". #5

Open
jbcloudie opened this issue Nov 30, 2023 · 0 comments

Comments

@jbcloudie
Copy link

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Attempted to run the provided code sample after following the pre-requisites and updating with my client ID and tenant id, it errors at
$publicClient.AcquireTokenWithDeviceCode("User.Read",[DeviceCodeHelper]::GetDeviceCodeResultCallback()).ExecuteAsync().Result

Any log messages given by the failure

Cannot find an overload for "AcquireTokenWithDeviceCode" and the argument count: "2".
At .\deviceCodeSample.ps1:61 char:5
$TokenResponse = $publicClient.AcquireTokenWithDeviceCode([string ...
CategoryInfo : NotSpecified: (:) [], MethodException
FullyQualifiedErrorId : MethodCountCouldNotFindBest

Expected/desired behavior

I expect to receive a message in the console with a url and code.

OS and Version?

Windows 11

Versions

Tested in both Powershell 5.1 and 7.3

Mention any other details that might be useful


Thanks! We'll be in touch soon.

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

1 participant