cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Andy6
Frequent Visitor

Loading an assembly required for interactive user authentication failed. Make sure assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms, Version=2.12.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' exists

Following the documentation here to install the Azure PowerShell modules

 

https://docs.microsoft.com/en-ca/power-platform/admin/powerapps-powershell

 

I used the following commands to install the following modules

 

Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
Install-Module -Name Microsoft.PowerApps.PowerShell -AllowClobber

 

After the install I tried to run Get-PowerApp and get the following error

 

Add-PowerAppsAccount : Exception calling "AcquireToken" with "4" argument(s): "Loading an assembly required for
interactive user authentication failed. Make sure assembly
'Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms, Version=2.12.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' exists"
At C:\Program
Files\WindowsPowerShell\Modules\Microsoft.PowerApps.PowerShell\1.0.8\Microsoft.PowerApps.AuthModule.psm1:150 char:9
+ Add-PowerAppsAccount
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-PowerAppsAccount], MethodInvocationException
+ FullyQualifiedErrorId : AdalException,Add-PowerAppsAccount

 

Please help.

2 REPLIES 2
v-monli-msft
Community Support
Community Support

Hi @Andy6 ,

 

Have you added the 'Microsoft.IdentityModel.Clients.ActiveDirectory' as a reference assembly? Please refer to the link below.

stackoverflow.com/questions/.../the-located-assemblys-manifest-definition-does-not-match-the-assembl...

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Mona,

I tried to include references to the dll using the import-module PowerShell command below for the various versions of the dll that were installed to my computer

import-module "C:\Program Files\On-premises data gateway\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll"

However, I still get the same issue. I checked the versions of the dlls that I have available and only see the following versions

2.0.1856.0
2.12.11107.1459
2.14.20115.1115
2.16.20422.1202
2.18.20625.1556
2.19.20802.0213
2.22.30211.1727
2.26.30510.2204
2.28.31117.1411
2.29.40822.1520
3.10.30516.1347
3.13.30916.1658
3.14.40721.0918
3.16.40804.1618
3.17.41115.0111
3.19.50302.0130
3.19.50420.1321
3.19.50523.1839
3.19.50615.2102
3.19.50615.2240
5.0.2.0
5.1.0.0
5.2.0.0

Where do I get Version=2.12.0.0?
Is there an install reference not included in the documentation I need to add?
Also why is there a version dependency to such an old version (Version=2.12.0.0, current Version=5.2.0.0)?

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (21,761)