service account
5 TopicsInformes de descarga des power bi services
I need to download a report which has 3 pages as image and is published to power bi service and store that download in a local folder. I have the following code, but it gives me an authentication canceled error, notice that it has all the permissions in the power bi service and also in the application. Código en .ps1 # Variables de configuración $clientId = " " $tenantId = " " $workspaceId = " " $reportIds = @(" ") # Lista de ID de los informes que deseas descargar $outputPath = "C:\Users\ASUS\Documents\ ImgMob" $logFilePath = "C:\Users\ASUS\Documents\ImgMob\PowerBI_Logs.txt" # Credenciales codificadas $nombredeusuario = " " $contraseña = " " # Función para escribir en el log function Write-Log { param ( [string]$message ) $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss" $logMessage = "$timestamp - $message" Salida de escritura $logMessage $logMessage | Archivo de salida -FilePath $logFilePath -Append -Encoding utf8 } # Autenticación # Autenticación Write-Log "Iniciando proceso de autenticacion" try { $response = Invoke-RestMethod -Method Post -Uri "https://login.microsoftonline.com/$tenantId/oauth2/v2.0/token" -ContentType "application/x-www-form-urlencoded" -Body @{ grant_type = "password" client_id = $clientId scope = "https://graph.microsoft.com/.default" username = $username password = $password } $token = $response.access_token Write-Log "Autenticacion exitosa" } catch { $exceptionMessage = $_.Exception.Message if ($_.Exception.InnerException) { $innerExceptionMessage = $_.Exception.InnerException.Message Write-Log "Error en la autenticacion: $exceptionMessage Detalles adicionales: $innerExceptionMessage" } else { Write-Log "Error en la autenticacion: $exceptionMessage" } exit } # Función para descargar una página del informe como imagen function Download-ReportPageImage { param ( [string]$reportId, [string]$pageName ) $outputFile = Join-Path $outputPath "Informe_${reportId}_${pageName}_$(Get-Date -Format 'yyyyMMddHHmmss').png" $uri = "https://api.powerbi.com/v1.0/myorg/groups/$workspaceId/reports/$reportId/pages/$pageName/exports/image" try { $response = Invoke-RestMethod -Method Get -Uri $uri -Headers @{ Authorization = "Bearer $token" } # Verificar si la respuesta tiene la imagen if ($response.image) { [System.IO.File]::WriteAllBytes($outputFile, [Convert]::FromBase64String($response.image)) Write-Log "Pagina ${pageName} del informe ${reportId} descargada y guardada en ${outputFile}" } else { Write-Log "La respuesta del servidor no contiene una imagen. Informe ${reportId}, página ${pageName}." } } catch { Write-Log "Error al descargar la pagina ${pageName} del informe ${reportId}: $($_.Exception.Message)" } } # Función para obtener las páginas del informe function Get-ReportPages { param ( [string]$reportId ) $uri = " https://api.powerbi.com/v1.0/myorg/groups/$workspaceId/reports/$reportId/pages " prueba { $response = Invoke-RestMethod -Method Get -Uri $uri -Headers @ { Authorization = "Bearer $token" } if ($response.value) { Write-Log "Paginas del informe ${reportId} obtenidas exitosamente" return $response.value } else { Write-Log "El servidor no devolvió ninguna página para el informe ${reportId}" return @() } } catch { Write-Log "Error al obtener las paginas del informe ${reportId}: $($_.Exception.Message)" return @() } } # Descargar todas las páginas de todos los informes foreach ($reportId in $reportIds) { $pages = Get-ReportPages -reportId $reportId if ($pages.Count -eq 0) { Write-Log "No se pudieron obtener las páginas del informar ${reportId}. Saltando al siguiente informe." continuar } foreach ($página en $páginas) { Descargar-ReportPageImage -reportId $reportId -pageName $page.name } } Write-Log "Todas las paginas de todos los informes han sido descargadas." Error Someone please help or can give me another alternative to carry out this process.182Views0likes0CommentsIntune service account
Hi, We have created the dashboaed using intune odata link. Due to password change policy in organization, we have created a intune service account. Now I am unable to find the way to use this service account to fetch data from intune. Request your help and guidance to get data from intune using service account credentials.Solved8KViews0likes1CommentService Account - Credentials to refresh data, error by Refresh
Hi, I would like to understand something since me and my colleagues are using a common Service account to schedule the refresh of our data sources in Report Server. The SVC is authorized correctly on every SQL Server, Folder or source we are using. The data refresh seems to be working just partially, sometimes it happens succesfully, several times it throws the error. The below is an example of it, I didnt change anything between the 2 schedules, same da different results. It seems to be some kind of Queue error, probably too many Reports are due to refresh at the same time, but I can't find any info about it on the web. Is there somebody who knows about this issue and the related solution? Many thanks653Views0likes0CommentsPower BI Service account breaking its connectivity in Jan 2019
Hello Team, After we moved to Jan 2019 release, we have been experiencing that the Power BI Report server is breaking its service account connection during weekend. We had to re-establish the the same service account connection to bring up the Power BI Report server URL on Monday. And once re-configuring completes, the URL comes up without any issue. Has anyone experienced this issue with their system? Any lead on solving this will eb helpful. Thanks, RohithSolved2.3KViews0likes2CommentsPower BI Report Server application is not coming up after weekly reboot completes
Hello PBI Team, We have been noticing that the Power BI Report Server application is not coming up after weekly reboot completes. We noticed this behaviour continouly for the 4th time. Everytime time during weekly reboot of the windows server, apps goes down and once the reboot completes, app doesnt comes up by itself. We have to go in to the Reprot server configuration wizard and manually configure the account again. Could anyone direct us on how we can fix this issue. Error log details: --msmdsrv log entry (3/10/2019 3:00:04 AM) Message: Service stopped. (Source: \\?\C:\Program Files\Microsoft Power BI Report Server\PBIRS\LogFiles\msmdsrv.log, Type: 1, Category: 289, Event ID: 0x41210001) ++++++++++++++++++++++++++++++++++++ --Reportservices log file entries <Header> <Product>Report Server Version 2018.0150.1102.235 ((BI_Server_Release).190130-0310)</Product> <Locale>English (United States)</Locale> <TimeZone>Eastern Standard Time</TimeZone> <Path>C:\Program Files\Microsoft Power BI Report Server\PBIRS\Logfiles\ReportingServicesService_2019_03_10_00_01_58.log</Path> <SystemName>O171-S021-WD01</SystemName> <OSName>Microsoft Windows NT 6.2.9200</OSName> <OSVersion>6.2.9200</OSVersion> <ProcessID>8132</ProcessID> <Virtualization>Hypervisor</Virtualization> </Header> <ProcessorArchitecture>AMD64</ProcessorArchitecture> <ApplicationArchitecture>AMD64</ApplicationArchitecture> library!WindowsService_11!29a8!03/10/2019-00:01:58:: i INFO: Call to CleanBatch() library!WindowsService_11!29a8!03/10/2019-00:01:58:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings, 0 edit sessions, 0 extended content cache. library!WindowsService_11!29a8!03/10/2019-00:01:58:: i INFO: Call to CleanBatch() ends library!WindowsService_11!1694!03/10/2019-00:11:58:: i INFO: Call to CleanBatch() library!WindowsService_11!1694!03/10/2019-00:11:58:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings, 0 edit sessions, 0 extended content cache. library!WindowsService_11!1694!03/10/2019-00:11:58:: i INFO: Call to CleanBatch() ends library!WindowsService_11!2760!03/10/2019-00:21:58:: i INFO: Call to CleanBatch() library!WindowsService_11!2760!03/10/2019-00:21:58:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings, 0 edit sessions, 0 extended content cache. library!WindowsService_11!2760!03/10/2019-00:21:58:: i INFO: Call to CleanBatch() ends library!WindowsService_11!1b64!03/10/2019-00:31:58:: i INFO: Call to CleanBatch() library!WindowsService_11!1b64!03/10/2019-00:31:58:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings, 0 edit sessions, 0 extended content cache. library!WindowsService_11!1b64!03/10/2019-00:31:58:: i INFO: Call to CleanBatch() ends library!WindowsService_11!1b64!03/10/2019-00:41:58:: i INFO: Call to CleanBatch() library!WindowsService_11!1b64!03/10/2019-00:41:58:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings, 0 edit sessions, 0 extended content cache. library!WindowsService_11!1b64!03/10/2019-00:41:58:: i INFO: Call to CleanBatch() ends library!WindowsService_11!2760!03/10/2019-00:51:58:: i INFO: Call to CleanBatch() library!WindowsService_11!2760!03/10/2019-00:51:58:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings, 0 edit sessions, 0 extended content cache. library!WindowsService_11!2760!03/10/2019-00:51:58:: i INFO: Call to CleanBatch() ends library!WindowsService_11!1b64!03/10/2019-01:01:58:: i INFO: Call to CleanBatch() library!WindowsService_11!1b64!03/10/2019-01:01:58:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings, 0 edit sessions, 0 extended content cache. library!WindowsService_11!1b64!03/10/2019-01:01:58:: i INFO: Call to CleanBatch() ends library!WindowsService_11!bd8!03/10/2019-01:11:58:: i INFO: Call to CleanBatch() library!WindowsService_11!bd8!03/10/2019-01:11:58:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings, 0 edit sessions, 0 extended content cache. library!WindowsService_11!bd8!03/10/2019-01:11:58:: i INFO: Call to CleanBatch() ends library!WindowsService_11!2f10!03/10/2019-01:21:58:: i INFO: Call to CleanBatch() library!WindowsService_11!2f10!03/10/2019-01:21:58:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings, 0 edit sessions, 0 extended content cache. library!WindowsService_11!2f10!03/10/2019-01:21:58:: i INFO: Call to CleanBatch() ends library!WindowsService_11!bcc!03/10/2019-01:31:58:: i INFO: Call to CleanBatch() library!WindowsService_11!bcc!03/10/2019-01:31:58:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings, 0 edit sessions, 0 extended content cache. library!WindowsService_11!bcc!03/10/2019-01:31:58:: i INFO: Call to CleanBatch() ends library!WindowsService_11!2760!03/10/2019-01:41:58:: i INFO: Call to CleanBatch() library!WindowsService_11!2760!03/10/2019-01:41:58:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings, 0 edit sessions, 0 extended content cache. library!WindowsService_11!2760!03/10/2019-01:41:58:: i INFO: Call to CleanBatch() ends library!WindowsService_11!1134!03/10/2019-01:51:58:: i INFO: Call to CleanBatch() library!WindowsService_11!1134!03/10/2019-01:51:58:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings, 0 edit sessions, 0 extended content cache. library!WindowsService_11!1134!03/10/2019-01:51:58:: i INFO: Call to CleanBatch() ends dbcleanup!WindowsService_11!279c!03/10/2019-03:00:00:: i INFO: Expiring old execution log entries dbcleanup!WindowsService_11!279c!03/10/2019-03:00:00:: i INFO: Expiration of old execution log entries is complete. Removed 275 entries. dbcleanup!WindowsService_11!279c!03/10/2019-03:00:00:: i INFO: Cleaned 0 broken snapshots, 0 chunks, there were 0 unsuccessful attempts dbcleanup!WindowsService_11!279c!03/10/2019-03:00:00:: i INFO: Cleaned 0 parameters values dbcleanup!WindowsService_11!279c!03/10/2019-03:00:00:: i INFO: Cleaned 0 unused segment mappings. dbcleanup!WindowsService_11!279c!03/10/2019-03:00:00:: i INFO: Cleaned 0 unused segments. library!WindowsService_11!279c!03/10/2019-03:00:00:: i INFO: Using folder C:\Program Files\Microsoft Power BI Report Server\PBIRS\ReportServer\RSTempFiles for temporary files. dbcleanup!WindowsService_11!279c!03/10/2019-03:00:00:: i INFO: Completed cleaning 0 files rshost!rshost!bd8!03/10/2019-03:00:03:: i INFO: Control-Shutdown event rpcserver!DefaultDomain!4c!03/10/2019-03:00:03:: i INFO: Process monitoring stopped. rpcserver!DefaultDomain!bd8!03/10/2019-03:00:03:: i INFO: RPC Server stopped. servicecontroller!DefaultDomain!bd8!03/10/2019-03:00:03:: i INFO: ServiceAppDomainController - RPC Server stopped. servicecontroller!DefaultDomain!bd8!03/10/2019-03:00:03:: i INFO: InternalStop: stop the service code running in the worker domain servicecontroller!DefaultDomain!bd8!03/10/2019-03:00:03:: i INFO: InternalStop: found a worker domain servicecontroller!WindowsService_11!bd8!03/10/2019-03:00:03:: i INFO: Service controller exiting. appdomainmanager!DefaultDomain!bd8!03/10/2019-03:00:03:: i INFO: UnloadAppDomain: 14, 'WindowsService_11' appdomainmanager!DefaultDomain!bd8!03/10/2019-03:00:03:: i INFO: Unregistering AppDomain id='14' dbpolling!WindowsService_11!aa0!03/10/2019-03:00:03:: i INFO: EventPolling polling service stopped dbpolling!WindowsService_11!aa0!03/10/2019-03:00:03:: i INFO: NotificationPolling polling service stopped dbpolling!WindowsService_11!aa0!03/10/2019-03:00:03:: i INFO: SchedulePolling polling service stopped dbpolling!WindowsService_11!aa0!03/10/2019-03:00:03:: i INFO: UpgradePolling polling service stopped appdomainmanager!DefaultDomain!bd8!03/10/2019-03:00:03:: i INFO: Unregistering AppDomain: searching for AppDomain id '14' appdomainmanager!DefaultDomain!bd8!03/10/2019-03:00:03:: i INFO: Appdomain:14 WindowsService_11 unregistered. appdomainmanager!DefaultDomain!bd8!03/10/2019-03:00:03:: i INFO: UnloadAppDomain WindowsService: 14, 'WindowsService_11' appdomainmanager!DefaultDomain!bd8!03/10/2019-03:00:03:: i INFO: SetUnloadStarted AppDomain id '14': unloadStarted = 1 appdomainmanager!DefaultDomain!bd8!03/10/2019-03:00:03:: i INFO: Appdomain:14 WindowsService_11 unloading. appdomainmanager!DefaultDomain!bd8!03/10/2019-03:00:03:: i INFO: AsyncDomainUnloading::Start - waiting for the unloading thread to finish unloading AppDomain '14'; Mark the WindowsService (worker) AppDomain as active. appdomainmanager!DefaultDomain!bd8!03/10/2019-03:00:03:: i INFO: ReportService::MarkProcessAsActive - Mark the WindowsService (worker) AppDomain as active. appdomainmanager!DefaultDomain!ac4!03/10/2019-03:00:03:: i INFO: AppDomain:14 0 pending unload(s) appdomainmanager!DefaultDomain!ac4!03/10/2019-03:00:03:: i INFO: AppDomain: calling AppDomain.Unload(AppDomain 14) appdomainmanager!DefaultDomain!1b20!03/10/2019-03:00:03:: i INFO: Unregistering AppDomain id='14' appdomainmanager!DefaultDomain!1b20!03/10/2019-03:00:03:: i INFO: Unregistering AppDomain: searching for AppDomain id '14' appdomainmanager!DefaultDomain!1b20!03/10/2019-03:00:03:: i INFO: Appdomain:14 was not registered. Its registration was probably already replaced with a new AppDomain (since this one is getting recycled). rshost!rshost!1b20!03/10/2019-03:00:03:: i INFO: Application domain type WindowsService statistics: created: 12, unloaded: 12, failed: 0, timed out: 0. servicecontroller!DefaultDomain!bd8!03/10/2019-03:00:04:: i INFO: Service shutting down. ++++++++++++++++++++++++++++++++++++++++++++++++++++ --RShostingservices log file entries 2019-03-10 01:47:07.1736|INFO|21|Deleting expired log file: C:\Program Files\Microsoft Power BI Report Server\PBIRS\LogFiles\RSPowerBI_2019_02_24_00_02_02.log Last written: 2/24/2019 1:47:02 AM 2019-03-10 03:00:03.9957|INFO|1|Logger shutting down 2019-03-10 03:00:04.0847|WARN|34|Child Process [AS] Died. Check the log for further information 2019-03-10 03:00:04.0847|WARN|59|Child Process [RS Service] Died. Check the log for further information 2019-03-10 03:00:04.0917|INFO|34|Immediate restart of process AS +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Solved3.4KViews0likes1Comment