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

AAD DLL provided is wrong version #12

Open
DianeHadley opened this issue Apr 9, 2019 · 3 comments
Open

AAD DLL provided is wrong version #12

DianeHadley opened this issue Apr 9, 2019 · 3 comments

Comments

@DianeHadley
Copy link

The updated script in AADTool (Common.ps1) relies on a newer version of the AAD dll than that which is provided. Running script with old version leads to the following error: New-Object : Cannot find type [Microsoft.IdentityModel.Clients.ActiveDirectory.PlatformParameters]: verify that the assembly containing this type is loaded.

@serkanozkul
Copy link

serkanozkul commented May 7, 2019

Same issue here!

Replacing the "Microsoft.IdentityModel.Clients.ActiveDirectory.dll" from the latest source below worked.
https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/

@bnlprsd
Copy link

bnlprsd commented Jun 5, 2019

Same issue here!

Replacing the "Microsoft.IdentityModel.Clients.ActiveDirectory.dll" from the latest source below worked.
https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/

Then what change did you make in Common.ps1 to run it again successfully?
Also which version of the dll did you use?

erikadoyle added a commit to Azure-Samples/service-fabric-aad-helpers that referenced this issue Jun 28, 2019
@harryzsh
Copy link

harryzsh commented Sep 10, 2019

Tried the latest source from https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/

but still not working

Cannot find an overload for "AcquireTokenAsync" and the argument count: "4".
At C:\Users\shz\Desktop\Azure-PowerShell-Snippets-master\Azure-PowerShell-Snippets-master\MicrosoftAzureServiceFabric-AADHelpers\AADTool\Common.ps1:36 char:5

  • $accessToken = $authenticationContext.AcquireTokenAsync($resource ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodException
    • FullyQualifiedErrorId : MethodCountCouldNotFindBest

Invoke-RestMethod : {"odata.error":{"code":"Authentication_MissingOrMalformed","message":{"lang":"en","value":"Access Token missing or malformed."}}}
At C:\Users\shz\Desktop\Azure-PowerShell-Snippets-master\Azure-PowerShell-Snippets-master\MicrosoftAzureServiceFabric-AADHelpers\AADTool\Common.ps1:46 char:13

  • return (Invoke-RestMethod $uri -Method $method -Headers $headers  ...
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

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

4 participants