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

Community site session details

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

Add-PowerAppsAccount - System.Security.Cryptography.SHA256Cng

Like (1) ShareShare
ReportReport
Posted on 9 Jul 2021 21:46:21 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:
I have the same question (0)
  • robcaretta Profile Picture
    75 on 09 Jul 2021 at 22:05:14
    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,412 Most Valuable Professional on 09 Jul 2021 at 21:52:41
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Featured topics

Loading complete