Where do I save token in Power BI web connection? - powerbi

I am new to Power BI, and starting to use the "From Web" data source. It works great.
But where do I save tokens, so I don't have to provide them as plain-text in every web connection?
I don't seem to find any documentation on variables to do this.

First step is to create a token parameter:
Now open the Advanced Editor, and refrence the token param from above:
In my case, the headers section uses the bearer token pattern:
[Headers=[Authorization="Bearer " & token]]
And ready to roll :)

Related

Jmeter multiple users/sessions not working

I'm using JMeter to do load tests in SAP CRM Web client and I'm having a problem with sessions. The goal of this test plan is to run multiple operations in parallel. I'm using the same user to create multiple sessions but when i ran the test with 10 threads(users) and i can see in the response that only the first session is running correctly and the other 9 are either not doing anything or assuming/merging with the first session when presenting the results.
I used Cookie manager to store cookies automatically and I had to JMeter user.properties:
CookieManager.save.cookies=true
CookieManager.check.cookies=false
SAP CRM uses:
XSRF-TOKEN;
sap-contextid;
app-contextid;
sessionid;
MYSAPSSO2;
esid;
crm-icsessionsyncid;
crm-icesid;
session_access_token;
To Log in I’m using basic auth token (name: Authorization)
I have already looked through all the request and identified all the dynamic parameters and tokens that are or can be directly linked to maintaining the session opened except for one token that I cannot understand how it is generated.
We used HTTP script recorder so the paths are automatically field, furthermore the path is field with a token making it a hardcoded token and it appears multiple times. Being an hardcoded token I can't extract it. It seems to be a mix of multiple tokens that I referred above:
/sap(bD1QVCZjPTEwMCZpPTEmZT1SNVpsejRYOEJGOXpzUm5zT2ExSlZRJTNkJTNkQUZCV3RfWkdIdHFOMjN5eXBSaG5aUSUzZCUzZA==)/bc/bsp/XX/XXXXXX_XX_XXXXX/XXXXX.htm
This token changes if I record a new script but I cannot understand how can extract this token and print it in the other URL requests.
Is there any solution for this session problem?
Regular Expression Extractor can be used for extracting a dynamic ID from the URL.
Please see a sample below.

Power BI Embedded Access Token Issue

Trying to embed Power BI dashboard into our Angular application. The issue is that we're getting the ID token instead of access token. Moreover, there's a cross origin issue as well. If we get the token from postman and embed in a sample web page, it works but when we call it within our application, it doesn't work. It give the following error:
ERROR:
Error: Uncaught (in promise): Object: {"message":"LoadReportFailed","detailedMessage":"Fail to initialize - Could not resolve cluster","errorCode":"403","level":6,"technicalDetails":
{"requestId":"cde7a17e-5baa-454c-8e8b-72e5b9f1307e"}}
Any help would be highly appreciated.
Granted all permissions on the app created on azure. Used implicit grant.
Need the access token instead of ID token.
Accordin the official troubleshooting guide, this error means that "Embed type doesn't match token type". So this probably is a bug in your code. In Embed Configuration Details check the value of tokenType property. It can be either AAD or Embed. Make sure it matches the type of the token, that you provided in accessToken property.
AAD tokens are acquired when authenticating against Azure AD (usually by calling some AcquireTokenAsync method). You can use them to access all reports that your user has access to, and to make Power BI REST API calls.
Embed tokens are acquired by calling GenerateTokenInGroup or other similar method. They are valid for a specific object (e.g. only this one report) and are the recommended way to embed Power BI elements in your application, but they require a capacity (Power BI Premium or Embedded) assigned to your workspace.

Bing Local Business Search API | Sending a request with Postman

I am trying to send a request to the Bing Local Business Search API using Postman.
It's giving a 404 status.
If I use the default URL not the regional one that matches my key it will return invalid key which makes sense, sounds like it's connecting properly.
But if I use the regional southcentral endpoint from my dashboard it returns a 404.
I signed up for the free plan and generated a key that I am using.
Here are my settings in postman. Thanks in advance.
I think you'll need to go into the Azure Portal. Under Cognitive Services create a new service with Bing Search v7 under the free tier. It should give you a global location. After it's created you'll get your keys. At least that worked for me. Their initial "Welcome page" keys did not work for me either, I don't understand why.
Then you'll be able to call - https://api.cognitive.microsoft.com/bing/v7.0/localbusinesses/search?q=chicago+restaurants&mkt=en-US
I think you need to URL encode the search params, the space after q=chicago should be %20.

BI Publisher Web Service Token expire time

I'm working on BI Publisher web service.
first, I call the login() with user name and password to get the TOKEN;
then, I call other insession methods with the TOKEN
My question is:
By default, how long the TOKEN will expire? This is a configuration in BI Publisher?
Thanks
There is a file called web.xml somewhere in your BI Publisher install tree. Per the Oracle blog post, it's found at:
\applications\xmlpserver\xmlpserver\WEB-INF\web.xml
However, on my BI Publisher Trial Edition installation, it's found at:
\bip\server\wls\user_projects\applications\bipdomain\xmlpserver\WEB-INF\web.xml
Thus, you may need to do a bit of searching to find it. Wherever it is, you want to find this tag combination:
<session-config>
<session-timeout>20</session-timeout>
</session-config>
The value of session-timeout is measured in minutes.

How to get access to google analytics data API using Pentaho PDI (Kettle version 4.2.1)

When I use the Google Analytics Input Step, all I have to enter is my account username and password for the Authorization. From there, the step looks up the Domain Table ID for me. So by just giving this step my username and password, choosing the id and the metrics, I am able to retrieve all of the information I need--no other authorization required.
However, I am trying to recreate this by using the HTTP Client Lookup step (with a Generate Rows step before it). I gave it the following URL, as described by http://code.google.com/apis/analytics/docs/gdata/v3/reference.html:
https://www.googleapis.com/analytics/v3/data/ga?ids=ga:{*My Domain Table ID*}&start-date=2010-08-01&end-date=2012-04-01&metrics=ga:newVisits
and filled in the Http Login and Http Password fields with my username and password (exactly same as in Google Analytics Input step), respectively. However, when I preview the results of this HTTP Client step, the transformation returns an error that says that Login is required.
I have also tried this with the REST Client Lookup Step (with a Generate Rows step before it). I chose the GET HTTP method, the JSON application type, and filled in my HTTP Login and password for authentication. When I try to run this, it does not return an error, but in the result field of the preview output it says "Invalid Credentials."
What is the Google Analytics Input Step doing differently from the HTTP Client Lookup and REST Client Lookup steps? And how do I access the same information using those lookup steps?
I want to be able to access API's from other web sites as well, not just from Google Analytics, so it is important for me to be able to do this for any API.
Any help appreciated!
I have made ​​a request to google analytics using HTTP client step, and it works perfect.
First, you need a token from Google Analytics:
https://www.google.com/accounts/ClientLogin?accountType=GOOGLE&Email=xxxxxxx#gmail.com&Passwd=xxxxxxx&service=analytics
This token is a long string.
The token is going to step client as HTTP header. The parameter must be called:
Authorization = token
Others parameters:
GData-Version=3.
After you add the request parameters. (ids, start-date, end-date, metrics, filter, segment)
You also have to add the key to your profile id, as the last parameter.
This request returns a XML. Use XML parser step to get metrics value.
which Kettle version are you using? as far as i know there are some changes in google api
read this bug report:
http://jira.pentaho.com/browse/PDI-7942