Quantcast
Channel: Developer topics
Viewing all 16239 articles
Browse latest View live

Automate REST API Data Push

$
0
0

My goal is to periodically push data to a Power BI dataset using their REST API without user intervention.

It seems like the only way that's currently possible is to configure user credentials into the application and authenticate that way. All examples of the 'App Owns Data' strategy require a user to log in, and then the Power BI APIs push data on the logged-in user's behalf.

I wrote an Azure WebJob that uses the credentials of a service account we created to authenticate with Azure AD and it's successfully pushing data to Power BI, but I'd like to do avoid having a service account just for this as it has cost and security implications.

Is there a way to use the Power BI REST API without user intervention and without logging in using Azure AD credentials?


Cannot read property 'sizeInMBs' of undefined in Q&A Embedded

$
0
0

I am trying to embed Q&A using a dataset in Azure Analysis services Tabular model in the cloud. The Q&A gets embedded. On typing a question, I get the following error

 

TypeError: Cannot read property 'sizeInMBs' of undefined
at n.handleLoadingNotification (powerbi.qnaweb.min.js:1)
at n.updateState (powerbi.qnaweb.min.js:1)
at n.onInterpretIssued (powerbi.qnaweb.min.js:1)
at e.onInterpretIssued (powerbi.qnacore.min.js:5)
at e.onInterpretIssued (powerbi.qnacore.min.js:5)
at e.onInterpretIssued (powerbi.qnacore.min.js:5)
at o.sendInterpretForCurrentInput (powerbi.qnacore.min.js:1)
at powerbi.qnacore.min.js:1
at e.performTransitionInternal (powerbi.qnacore.min.js:4)
at e.enqueueTransition (powerbi.qnacore.min.js:4)
(anonymous) @ reportembed.externals.bundle.min.js:646
(anonymous) @ reportembed.externals.bundle.min.js:618
$apply @ reportembed.externals.bundle.min.js:673
(anonymous) @ reportembed.externals.bundle.min.js:810
dispatch @ reportembed.externals.bundle.min.js:521
r.handle @ reportembed.externals.bundle.min.js:521
t.invokeTask @ reportEmbed.min.js:1
e.runTask @ reportEmbed.min.js:1
e.invokeTask @ reportEmbed.min.js:1
h @ reportEmbed.min.js:1
p @ reportEmbed.min.js:1

Any Suggestions?

Cannot read property 'sizeInMBs' of undefined error in Q&A Embedded

$
0
0

I am trying to embed Q&A using a dataset in Azure Analysis services Tabular model in the cloud. The Q&A gets embedded. On typing a question, I get the following error

 

TypeError: Cannot read property 'sizeInMBs' of undefined
at n.handleLoadingNotification (powerbi.qnaweb.min.js:1)
at n.updateState (powerbi.qnaweb.min.js:1)
at n.onInterpretIssued (powerbi.qnaweb.min.js:1)
at e.onInterpretIssued (powerbi.qnacore.min.js:5)
at e.onInterpretIssued (powerbi.qnacore.min.js:5)
at e.onInterpretIssued (powerbi.qnacore.min.js:5)
at o.sendInterpretForCurrentInput (powerbi.qnacore.min.js:1)
at powerbi.qnacore.min.js:1
at e.performTransitionInternal (powerbi.qnacore.min.js:4)
at e.enqueueTransition (powerbi.qnacore.min.js:4)
(anonymous) @ reportembed.externals.bundle.min.js:646
(anonymous) @ reportembed.externals.bundle.min.js:618
$apply @ reportembed.externals.bundle.min.js:673
(anonymous) @ reportembed.externals.bundle.min.js:810
dispatch @ reportembed.externals.bundle.min.js:521
r.handle @ reportembed.externals.bundle.min.js:521
t.invokeTask @ reportEmbed.min.js:1
e.runTask @ reportEmbed.min.js:1
e.invokeTask @ reportEmbed.min.js:1
h @ reportEmbed.min.js:1
p @ reportEmbed.min.js:1

Any Suggestions?

Embedded free trial

$
0
0

Hello,

 

I would like to test the Embedded Version but I couldnt find any information if theres a free trial. Does Microsoft offer something in the direction?

 

best regards

Set Parameters API returning error - Dataset Parameters list is invalid - Reason Empty

$
0
0

Hi

I have created the following PowerShell Script to set parameters for a dataset , it returns the list is empty even though its not, the parameters list is a list I created in Power Query and referenced as query in the manage parameters section

 

Help would be appreciated - this is the error  

 

VERBOSE: POST https://api.powerbi.com/v1.0/myorg/groups/e7229a42-46ef-4d80-b8ca-e42909509dbb/datasets/68fbeff4-ce61-43d4-8f8d-74dcd1452393/UpdateParamet
ers with -1-byte payload
VERBOSE: received -1-byte response of content type application/octet-stream
updateDetails                  
-------------                  
{@{name=Type; newValue=Product}}

 


error : @{code=InvalidRequest; message=Dataset Parameters list is invalid in 68fbeff4-ce61-43d4-8f8d-74dcd1452393. Reason: Empty;
        target=68fbeff4-ce61-43d4-8f8d-74dcd1452393}

 

 

This is the Script

$clientId = "ab3afa9b-c31f-41ed-bdc9-84c9c68069b9"


$groupID = "e7229a42-46ef-4d80-b8ca-e42909509dbb" # the ID of the group that hosts the dataset. Use "me" if this is your My Workspace
$datasetID = "68fbeff4-ce61-43d4-8f8d-74dcd1452393" # the ID of the dataset that hosts the dataset
$json = @"
{   "updateDetails": [

    {
      "name": "Type",
      "newValue": "Product"
    }
    ]
    }

"@

$powershellrepresentation = $json | ConvertFrom-Json

$powershellrepresentation


function GetAuthToken
{
    $adal = "${envSmiley TonguerogramFiles}\WindowsPowerShell\Modules\AzureRM.profile\4.5.0\Microsoft.IdentityModel.Clients.ActiveDirectory.dll"
   
    $adalforms = "${envSmiley TonguerogramFiles}\WindowsPowerShell\Modules\AzureRM.profile\4.5.0\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll"
 
    [System.Reflection.Assembly]::LoadFrom($adal) | Out-Null

    [System.Reflection.Assembly]::LoadFrom($adalforms) | Out-Null

    $redirectUri = "urn:ietf:wgSmiley Surprisedauth:2.0Smiley Surprisedob"

    $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
}

# Get the auth token from AAD
$token = GetAuthToken

# Building Rest API header with authorization token
$authHeader = @{
   'Content-Type'='application/json'
   'Authorization'=$token.CreateAuthorizationHeader()
}

# properly format groups path
$groupsPath = ""
if ($groupID -eq "me") {
    $groupsPath = "myorg"
} else {
    $groupsPath = "myorg/groups/$groupID"
}

# POST body
$postParams = $powershellrepresentation

$jsonPostBody = $postParams | ConvertTo-Json

# Make the request to clone the report
$uri = "https://api.powerbi.com/v1.0/$groupsPath/datasets/$datasetID/UpdateParameters"
try{$resp=Invoke-RestMethod -Uri $uri -Headers $authHeader -Method POST -Body $jsonPostBody -Verbose}
  catch {
        $streamReader = [System.IO.StreamReader]::new($_.Exception.Response.GetResponseStream())
        $ErrResp = $streamReader.ReadToEnd() | ConvertFrom-Json
        $streamReader.Close()
    }

    $ErrResp | Format-list

How to solve rendering problem when data points are very large?

$
0
0

I am trying to build a custom visual which contains nearly 20,000 data points in it. So my problem is when I resize or drag the report, all the points get distorted while displaying.

So, I want to capture the resizing event of a report and, it should stop rendering when I am resizing the report and once done resizing or dragging then display the chart again. 

 

Current Problem:

 

Is there any way I can reduce the lag or drag it smoothly. I can also stop rendering during resizing which is done in the second video.

 

Problem :

https://drive.google.com/file/d/13CiqdfEdU-9dlQ5SJ72eMWQabkfwZGiU/view?usp=sharing

 

Screen Shot 2018-04-15 at 3.03.41 AM.pngBefore DraggingScreen Shot 2018-04-15 at 3.04.12 AM.pngAfter Dragging

 

Desired Output:

 

The similar output which is in the video below is expected. Is it possible to capture the resizing so that I can stop rendering during that time? I am new to custom visual so if possible help me with the code. 

 

https://drive.google.com/file/d/17_W4BfAQtKEzdzbfQ1STBhhgdQ_Jb16f/view?usp=sharing

 

Any small help will be appreciated.

Thank you

 

Embedded Dashboard tiles not loading if they are mostly offscreen

$
0
0

If on initial load the majority of a tile extends past the height of the container the dashboard is embedded in it will not load. Visually this leaves a blank space in the dashboard until the user scrolls down the dashboard or the container is resized. It may be worth noting that we are using the fit-to-width page format for the embedded dashboards. Below is an example of the issue:

chrome_2018-04-16_09-51-14.pngchrome_2018-04-16_09-51-21.png

 

how do I duplicate a workspace

$
0
0

I need to duplicate a workspace which includes several Dashboards, Reports & Datasets. I need all of them from the Original one to a new workspace. How can I do it? Help required urgently. I can be contacted at: rajaa.chatterji@unifysolutions.net


Are the Powerbi REST API's any different as compared to App workspace collection?

$
0
0
I need some clarifications on powerbi embedded capacity
 
  1. Are the Powerbi REST API's any different as compared to App workspace collection?
  2. I have my embedded application (based on App workspace collection) which I am using for my customers, do I need to change my application when migrating to Powerbi Embedded or my application works as it is working now?
  3. When I do migrate my reports to Powerbi Embedded where can I see all my reports from azure portal?
 

Any Explanation to the above scenarios will help me alot 

How to remove app workspace

$
0
0

How do I remove the workspace I created in the app workspace? I cannot delete anymore because my trial is expired

hide custom visual title

$
0
0

Is there a way to hide custom visual title?

I tried css, jquery nothing worked. I tried to find a solution here, no result.

thanks

Custom Visual at Org level in Power BI

$
0
0

Hi All,

 

Recently MS introduced Custom visual to be published at Org level. I have created a custom R Visual and want to make it generic so that people in my Org can reuse the same code.

Is there any way to do it ?

I don't want end user to edit the R code. 

Also I would need steps to publish this at Org level so that the visual gets displayed in the My Org Visual list.

 

Regards,

Akash

Row level security python

$
0
0

Hello, 

I have this python code to generate access token with power bi embedded, it is working fine, but I want to add the identities parameter to take into account rls functionality

 

Here is the python code:

    def __init__(self, report_id, group_id, settings=None):
        self.username = 'MyUserName'
        self.password = 'MyPassword'
        self.client_id = '28c7e68d-6eb1-4be3-8b97-4c0fa9cd83d7'
        self.report_id = report_id
        self.group_id = group_id
        if settings is None:
            self.settings = {'accessLevel': 'View', 'allowSaveAs': 'false'}  
        else:
            self.settings = settings
        self.access_token = self.get_access_token()
        self.config = self.get_embed_token()


I think that identities should be added at this line :

self.settings = {'accessLevel': 'View', 'allowSaveAs': 'false'}


For more clarification I have a C# code that is working fine :

generateTokenRequestParameters = new GenerateTokenRequest("View", null, identities: new List<EffectiveIdentity> { new EffectiveIdentity(username: "EffectiveUserName", roles: new List<string> { "FranceSales" }, datasets: new List<string> { "382ea16c-fbcc-4cec-bb60-470aff4aebaa" }) });

 

Automate REST API Data Push Without Service Account

$
0
0

My goal is to periodically push data to a Power BI dataset using their REST API without user intervention.


The expalnations below for 'App Owns Data' is to configure user credentials into the application and authenticate that way, which is how I've done it so far:

 

https://docs.microsoft.com/en-us/power-bi/developer/get-azuread-access-token#access-token-for-non-power-bi-users-app-owns-data


I wrote an Azure WebJob that uses the credentials of a service account we created to authenticate with Azure AD and it's successfully pushing data to Power BI, but I'd like to do avoid having a service account just for this as it has cost and security implications.

Is there a way to use the Power BI REST API without user intervention and without logging in using Azure AD credentials?

Run time report generation

$
0
0

Hi everyone, I need to generate reports at run time based on the number of products i have in my database daily. For instance, if i have 2 products i will need to generate a reports with two visuals. The number of products stored in the database changes daily, therefore i need the program to automatically check the number of products and generate a set of visuals for each product.

 

Is this doable? Any idea how to implent it?

 

Thanks


Embedded report interaction outside Iframe

$
0
0

Hi there,

 

Forgive me if this is a silly question or my terminology is not correct (embedding is not a strong point for me). I am looking to have a report embedded into an app, easy enough, I know how this can be done.

 

What ideally I would like is for example, click on a customer in the embedded PBI report and that will then populate that customer into a "Price Calculator Tool" which will be developed seperately. The idea is that with this "Price Calculator Tool" it will give the user the option whether to update a customers price, by writing back into the database.

 

The PBI is used to calculate the new price and the "Price Calculator Tool" is used to update the price or not.

 

Capture.PNG

Can anyone tell me if this is in theory possible, and if so point me in the direction of some online resources?

 

Thanks,

Jake

Is it possible to embed report/dashboard with scroll?

$
0
0

What is the best way to embed a Power-BI-based "filter panel" into multiple webpages? The filter panel will be taller than the webpage, so needs to be scrollable. Should I embed each "filter visual" separately, or can I embed a whole dashboard (or report) full of filter visuals, into a scrollable div?

 

Background: I'm creating a little app with five webpages. Each page has the same filter panel but a different main visual. These main visuals will ultimately be custom visuals. The filter panel should work globally. Users of the app need not be very technical and will not know Power BI is behind the scenes, so we don't want them using drag and drop Power BI filters. Users need to be able to apply multiple filters at the same time.

 

I've embedded a tall thin report (custom page size) full of filter visuals, but it still scales to fit in the Power BI worksheet/filter bar wrapper.

 

Do I have to embed each visual separately?


Thanks
Emma

 

 

 

 

Getting Access token failing because of organization login

$
0
0

Hi I am trying to get the "App Owns Data" example to work. https://github.com/Microsoft/PowerBI-Developer-Samples/tree/master/App%20Owns%20Data to see how to intergrate powerBI reports on a web application. After putting in my pBIusername, password clientId and groupId into the Web.config example and running it I get this error message

 

Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: AADSTS75005: The request is not a valid SAML 2.0 protocol message.

 

I believe this is happening because I am using my organizaiton's login as it is the same credentials for my powerBI account. When I get authenticated with my organization's authentication server, it sends back a SAML 1.0 Message back to the Microsoft authentication server and gets denied because it is not SAML 2.0. Since this is in-flight data I have no way to edit this message before it gets kicked back to Microsofts auth. I was wondering if there is any work around to this? Any help would be greatly appreciated.

Career growth path

$
0
0

Hi there, 

I am a web developer (PHP). Last year, for the company I started learning power bi. I have knowledge of DAX formula, schedulre refresh. I added reports in php application using publish to web. I embed reports in web using Javascript embed reports.

Based on this knowledge, what is my opportunity in power bi career? What salary should I expect at this stage for Power BI developer? What other things I need to learn to make my career in Power BI? 

Please help me to clear my confusion about whether i should continue as Web Developer or Power BI developer?

Thanks,

wrong api version

$
0
0

I have an issue with the version number that is installed under the .api folder and ain all the configuration files when I run:  pbivis new <projectName>

The .api folder and the files in it refer to version 1.6.0 but using: pbiviz --version  returns a version of 1.6.2. 

Thanks to anyone who can explain why this is.

Viewing all 16239 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>