Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everyone,
In my custom connector, I am using UsernamePassword AuthenticationType, where Username = ClientId and Password = Client Secret. And using these, we are getting accesstoken. Can anyone let me know how do we get the refreshed token after it expires in this case?
@artemus Any guidance would be helpful.
Thanks.
IF you are using Username and password to get an access token, then your token will need to be fetched every time the connector is invoked. Oauth authentication supports refreshing a token.
In theory you could cache the access token, but this is rather complex, and only good if you have a short duration token and there are multiple invocations of your connector in a single session.
@artemus
How can we cache the access token? Can you show how can we implement this?
First, do you really need a cache over just getting a fresh token every time? The technique for getting a refreshable token I haven't actually seen used before as it requires a key that corrsponds to the time window in which the token is valid for, and only useful if your token can expire between requests in the same dataflow.
Unless you have a very special case, just get a fresh token when your connector is invoked using the
@artemus Thanks for the response.
We'll surely try that.
Do we have any function that clears the cache?
Or anyone if that has experience getting the refreshed token using UsernamePassword credential?
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
10 | |
7 | |
6 | |
6 | |
6 |