web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Add-PowerAppsAccount -...
Power Apps
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

I have the same question (0)
  • Verified answer
    ChrisPiasecki Profile Picture
    6,426 Most Valuable Professional on at

    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.

  • robcaretta Profile Picture
    75 on at

    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.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 846

#2
Valantis Profile Picture

Valantis 532

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard