Hello,
I'm trying to use the powerapps administration module (https://www.powershellgallery.com/packages/Microsoft.PowerApps.Administration.PowerShell/2.0.72) inside an Azure Runbook.
However when I try to authenticate using:
> $pass = ConvertTo-SecureString "password" -AsPlainText -Force
> Add-PowerAppsAccount -Username foo@zamir1 .com -Password $pass
I get the following error:
Add-PowerAppsAccount : Method invocation failed because
[Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext] does not contain a method named 'AcquireToken'.
At line:115 char:1
- Add-PowerAppsAccount -Endpoint prod -Username $username -Password $se ...
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [Add-PowerAppsAccount], RuntimeException
- FullyQualifiedErrorId : MethodNotFound,Add-PowerAppsAccount
The module is available from the Modules Gallery so I would assume it works.
I have tried the same from my machine and it works without issues so it seems the issue is azure automation.
From searching in google I found some people referring to iphlpapi.dll being outdated on azure automation.
How can I authenticate so I can use the module? Is there any alternative?
Thanks in advance.