Quantcast
Viewing all articles
Browse latest Browse all 17916

Expiration information about AccessToken generated with PowerBI Rest API

Hello,

 

We are developping an Delphi winform application which is reading powerBI report in TWebBrowser.

To call reports, we are reading AccessToken in an INI file previously generated with the ClientID created here : https://dev.powerbi.com/apps 

 

The AccessToken is generated with a C# console application with this code Image may be NSFW.
Clik here to view.
Smiley Sad
because we did not find any other solution to generated it in Delphi)

string redirectUri = "https://login.live.com/oauth20_desktop.srf";
string resourceUri = "https://analysis.windows.net/powerbi/api";
string authorityUri = "https://login.windows.net/common/oauth2/authorize";
AuthenticationContext authContext = new AuthenticationContext(authorityUri);
string token = authContext.AcquireToken(resourceUri, clientID, new Uri(redirectUri)).AccessToken;

When the user is running our application, he have to login with his powerBI account but we don't understand how many time the AcessToken is valid. Is there an expiration ? How can we set it ?

 

Thank you for your help.


Viewing all articles
Browse latest Browse all 17916

Trending Articles



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