Azure-docs: Object Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext does NOT offer a "AcquireToken" method

Created on 27 Mar 2019  Â·  7Comments  Â·  Source: MicrosoftDocs/azure-docs

The scripts on this page fail when invoking the "AcquireToken" method because it does not exist in Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.

Here's output from a Get-Member on an AuthenticationContext object created by the uninstall script. There is no "AcquireToken" method.

|Name|MemberType|
|----|----------|
|AcquireDeviceCodeAsync|Method|
|AcquireTokenAsync|Method|
|AcquireTokenByAuthorizationCodeAsync|Method|
|AcquireTokenByDeviceCodeAsync|Method|
|AcquireTokenSilentAsync|Method|
|Equals|Method|
|GetAuthorizationRequestUrlAsync|Method|
|GetHashCode|Method|
|GetType|Method|
|ToString|Method|

Here's a code snippet from the uninstall script showing the invalid method call:

$authContext = New-Object "Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext" -ArgumentList $authority
# Acquire token
$global:authResultARM = $authContext.AcquireToken($resourceAppIdURIARM, $clientId, $redirectUri, "Auto")

Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

azure-active-directorsvc cxp in-progress operations-management-suitsvc product-question triaged

All 7 comments

@yobyot Thank you for your query . We will investigate and update the thread .

@yobyot The object Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext you mentioned refers to Azure AD v1.0 client side authentication library aka ADAL library . Could you please check the ADAL library version you are using ? ADAL library is updated frequently and sometimes you may be running a version which may not have a method you are searching for as it might have been deprecated. Please let us know the version and we can get this further investigated.

Hi @yobyot ,

As Shashi mentioned, please ensure that you are using the right ADAL library version that contains that method.

If you are still having issues, feel free to reach out to use at [email protected] and we can open a support case, or open a thread on MSDN. https://social.msdn.microsoft.com/Forums/en-US/home?forum=WindowsAzureAD

Sheesh..so quick to close! Are you guys measured on having accurate docs and samples or on how quickly you "resolve" a problem? I haven't had a chance to "check the ADAL library" and am not sure that I should need to given that _it's not described nor documented in the instructions_.

@yobyot we are measured on both - with emphasis on unblocking our valued customers. :)
We are more than happy to assist with your issue but please be aware this channel is reserved for bugs/issues related to Documentation/content. Issues with product samples or services are better suited in our Azure support channels (urgent/service impacting) or our Forum channels (non-urgent).
If you do not have a support contract, send mail to [email protected], include your subscription ID and we will gladly assist you with engaging Azure technical support.

This _is_ a doc issue. Where are the dependencies (ADAL) described in the doc?

If this was an issue where the thing failed due to a user error or system problem, I agree it belongs in the support channels. But this is incomplete, impenetrable doc.

And your response is telling: you seem more interested in asserting that you don't have an issue because you've documented "the thing itself" even though without more information, the page is essentially useless.

Suppose you were documenting a 737 MAXX. And suppose you said the automated nose up system can be turned off by pressing the thumb switch on the yoke. But because the sensor is "someone else's product" you don't bother to doc that the sensor will restart the nose up every 40 seconds.

Users don't live in your organizational silos. If you are documenting how to connect and disconnect a Log Analytics solution, it should be documented so someone could actually connect and/or disconnect the solution.

@femsulu : How can this can't be closed, because there is no solution?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DeepPuddles picture DeepPuddles  Â·  3Comments

Favna picture Favna  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments

varma31 picture varma31  Â·  3Comments

mrdfuse picture mrdfuse  Â·  3Comments