Forum Discussion

rajulshah's avatar
rajulshah
Resident Rockstar
3 years ago

Refreshed Token using UsernamePassword Authentication Type

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.

6 Replies

  • artemus's avatar
    artemus
    Microsoft Employee

    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.

    • rajulshah's avatar
      rajulshah
      Resident Rockstar

      artemus 
      How can we cache the access token? Can you show how can we implement this?

      • rajulshah's avatar
        rajulshah
        Resident Rockstar

        Or anyone if that has experience getting the refreshed token using UsernamePassword credential?