microsoft / microsoft/powerbi-powershell
PowerShell Core Azure Function cant authenticate using Connect-PowerBIServiceAccount
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 413
- Forks
- 134
- Avg merge
- 33m
- Merged PRs (30d)
- 1
Description
Issue description
Upon trying to authenticate using MicrosoftPowerBIMgmt module it fails (Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.)
Steps to reproduce the issue
- Create Azure Function App Running Powershell Core 7
- Change requirements.psd1 to add 'MicrosoftPowerBIMgmt' = '1.*'
- Try to authenticate with Secret or Certificate using
Connect-PowerBIServiceAccount -ServicePrincipal -CertificateThumbprint "****" -ApplicationId $appid -Tenant $tenant
What's the expected result?
Connect to Powerbi Api
What's the actual result?
[Error] ERROR: One or more errors occurred. (Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.)
Additional details / screenshot
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in an Azure Function App running PowerShell Core 7 with MicrosoftPowerBIMgmt 1.* in requirements.psd1, then start from the Connect-PowerBIServiceAccount service-principal call shown. Investigate the SHA256Cng loading error and the 41-comment discussion; done means certificate or secret authentication connects to the Power BI API without the exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, powershell
- Domain
- authentication, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100