Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Doesn't execute in a runbook #34

Open
iburki opened this issue Oct 10, 2019 · 0 comments
Open

Doesn't execute in a runbook #34

iburki opened this issue Oct 10, 2019 · 0 comments

Comments

@iburki
Copy link

iburki commented Oct 10, 2019

Hello - can you please let me know how to execute this in a runbook? It works using powershell on the desktop, however, when I try to run it in a runbook, I get the error below. Thank you!

Exception calling "AcquireToken" with "4" argument(s): "Unable to find an entry point named 'GetPerAdapterInfo' in DLL
'iphlpapi.dll'."
At line:50 char:8
+        $authResult = $authContext.AcquireToken($resourceAppIdURI, $cl ...
+        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : EntryPointNotFoundException
 
You cannot call a method on a null-valued expression.
At line:59 char:1

  • $authHeader = @{

    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
 
POST https://api.powerbi.com/v1.0/myorg/groups/xxx with -1-byte payload
Invoke-RestMethod : The remote server returned an error: (403) Forbidden.
At line:80 char:1

  • Invoke-RestMethod -Uri $uri –Headers $authHeader –Method POST –Verbos ...

    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod],
WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant