Open pjoshi123 opened 6 years ago
If it is an on-premises data source, it will need a gateway.
I am having this problem... someone could help me?
PS C:\WINDOWS\system32> C:\Users\alexandre.staffa\SUHAI SEGURADORA\Informações de Gestão - Documentos\Atualizar Vendas.ps1
$adal = "${env:ProgramFiles(x86)}\Microsoft
SDKs\Azure\PowerShell\ServiceManagement\Azure\Services\Microsoft.IdentityModel.Clients.ActiveDirectory.dll"
$adalforms = "${env:ProgramFiles(x86)}\Microsoft
SDKs\Azure\PowerShell\ServiceManagement\Azure\Services\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll"
[System.Reflection.Assembly]::LoadFrom($adal) | Out-Null
[System.Reflection.Assembly]::LoadFrom($adalforms) | Out-Null
$redirectUri = "urn:ietf:wg:oauth:2.0:oob"
$resourceAppIdURI = "https://analysis.windows.net/powerbi/api"
$authority = "https://login.microsoftonline.com/common/oauth2/authorize";
$authContext = New-Object "Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext" -ArgumentList $authority
$authResult = $authContext.AcquireToken($resourceAppIdURI, $clientId, $redirectUri, "Auto")
return $authResult
GetAuthToken : O termo 'GetAuthToken' não é reconhecido como nome de cmdlet, função, arquivo de script ou programa operável. Verifique a grafia do nome ou, se um caminho tiver sido incluído, veja se o caminho está correto e tente novamente. No C:\Users\alexandre.staffa\SUHAI SEGURADORA\Informações de Gestão - Documentos\Atualizar Vendas.ps1:26 caractere:10
+ CategoryInfo : ObjectNotFound: (GetAuthToken:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Não é possível chamar um método em uma expressão de valor nulo. No C:\Users\alexandre.staffa\SUHAI SEGURADORA\Informações de Gestão - Documentos\Atualizar Vendas.ps1:27 caractere:1
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
MODO DETALHADO: POST https://api.powerbi.com/v1.0/myorg/groups/blank/datasets/blank/refreshes with 0-byte payload Invoke-RestMethod : O servidor remoto retornou um erro: (403) Proibido. No C:\Users\alexandre.staffa\SUHAI SEGURADORA\Informações de Gestão - Documentos\Atualizar Vendas.ps1:38 caractere:1
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
MODO DETALHADO: GET https://api.powerbi.com/v1.0/myorg/groups/erased/datasets/erased/refreshes with 0-byte payload Invoke-RestMethod : O servidor remoto retornou um erro: (403) Proibido. No C:\Users\alexandre.staffa\SUHAI SEGURADORA\Informações de Gestão - Documentos\Atualizar Vendas.ps1:40 caractere:1
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
PS C:\WINDOWS\system32>
This script for dataset refresh doesn't work for me. Does it need a gateway, similar to the usual data refresh? I don't have a gateway yet.