Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
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?
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 11 | |
| 4 | |
| 4 | |
| 4 |