Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Governance and Administ...
Answered

Add-PowerAppsAccount - System.Security.Cryptography.SHA256Cng

(1) ShareShare
ReportReport
Posted on by 75

I could really use some assistance with this module. I have the latest versions of Powershell 7.1.3, VS Code 1.57.1 , VS Code powershell extension 2021.6.2, and the latest version of Microsoft.PowerApps.Administration.PowerShell.

 

I can not for the life of my figure out how to authenticate with this module using this combination of technology.

 

When I run Add-PowerAppsAccount I receive the error message Add-PowerAppsAccount: Exception calling "AcquireToken" with "4" argument(s): "Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxx'."

 

Could you advise on what I am missing, or doing wrong?

Thanks,
Rob

Categories:
  • robcaretta Profile Picture
    75 on at
    Re: Add-PowerAppsAccount - System.Security.Cryptography.SHA256Cng

    Thanks for the prompt response.  I understand now, I can switch VS Code back to 5.1. Was hoping to start using more modern PS tooling but apparently can't.  Frustrating.

  • Verified answer
    ChrisPiasecki Profile Picture
    6,397 Most Valuable Professional on at
    Re: Add-PowerAppsAccount - System.Security.Cryptography.SHA256Cng

    Hi @robcaretta,

     

    You'll need to use Windows PowerShell with the PowerApps modules, the System.Net.Cryptography DLL that it depends on is built on .NET Framework, whereas PowerShell 7 is built on .Net Core. More information below:

     

    https://docs.microsoft.com/en-us/power-platform/admin/powerapps-powershell#requirements

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1

Featured topics