This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
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 April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |