Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello,
I am very new to JWT and trying to get access token as well as data through JWT rest Api.
so the authentication is done through JWT token and the token should be sent in the authentication header to get the data.
here's my code for now:
let
//URLs
urlApi = "https://myurl/outbound/api",
pathToken = "/account/requesttoken",
pathData = "/system/all",
//Client credentials
credentials = [ #"username" = "my_username", #"password" = "my_password" ],
//Get JSON Web Token via API
optionsToken = [Headers=[#"Content-Type"="application/json"],
Content=Json.FromValue(credentials)],
responseToken = Web.Contents(urlApi & pathToken, optionsToken),
//Get Access Token and Token Type
responseJson = Json.Document(responseToken),
accessToken = responseJson[token], // name of the token property
//Bearer Token
authorizationHeader = "Bearer " & accessToken,
//Get Data
optionsData = [Headers=[#"Authorization"=authorizationHeader]],
responseData = Web.Contents(urlApi & pathData, optionsData),
data = Json.Document(responseData)
in
data
the error I am getting is:
Expression.Error: We cannot apply field access to the type Text.
Details:
Value= what appears to be the token I guess? it is alot of random letters
Key=token
I would be grateful for your help.
Hi @Anonymous
Thanks for reaching out to us.
Here are some posts for your reference,
Solved: Re: Expression.Error: We cannot apply field access... - Microsoft Power BI Community
Table.TransformColumns - alternative in PowerBI and PowerQuery in Excel (thebiccountant.com)
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
I'm a little confused. I don't use transform column or Replace value. So how should this help me?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 84 | |
| 49 | |
| 38 | |
| 31 | |
| 30 |