Forum Discussion
Balaji_dev1
5 years agoRegular Visitor
Access Token expiry quickly or Operation timeout issue.
Hi, I am able to get access token and able to perform some dataset operations like Add row or get dataset Id. Problem is that after 2/3 operations/ web calls, it is throwing time operation timeout ...
Anonymous
5 years agoNot applicable
Hi Balaji_dev1
Access Token has expiration time, make sure the size of your data source.
You can try this way to get access token as well.
() =>
let
body = "client_id=" & #"App ID"
& "&scope=https://analysis.windows.net/powerbi/api/.default&client_secret=" & #"App Secret"
& "&grant_type=client_credentials",
Data= Json.Document(Web.Contents("https://login.microsoftonline.com/"& TenantID & "/oauth2/v2.0/token/",
[Headers=[#"Content-Type"="application/x-www-form-urlencoded"], Content=Text.ToBinary(body)])),
access_token = Data[access_token]
in
access_token
Or you can try this way to set expiration times for your access token.
Configurable token lifetimes in the Microsoft identity platform (preview)
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.