microsoft / microsoft/powerbi-powershell

PowerShell Core Azure Function cant authenticate using Connect-PowerBIServiceAccount

Open
#288 41 comments 1 reaction 0 assignees View on GitHub

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
  1. Create Azure Function App Running Powershell Core 7
  2. Change requirements.psd1 to add 'MicrosoftPowerBIMgmt' = '1.*'
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.