How long will RDP Refresh Token be expired?

As asked in the subject, can you advise when there is a need to re-send the request for a new Refresh Token before the previous one is expired? The post states that Access Token is expired in 5 mins but doesn't mention that of Refresh Token.

Best Answer

  • umer.nalla
    umer.nalla LSEG
    Answer ✓

    Hi @Tony.Zhu_R

    A few points of clarification.

    There are two types of credential a user may use to access RDP APIs + data

    A username is designed for display type usage only (e.g. for testing with the RDP API Playground) and will therefore expire within 18hrs and only allow a single connection at a time. It must not be used for programmatic access to RDP data.

    A MachineID is for programmatic access to RDP data and a correctly configured one should never expire under normal circumstances and it should also allow 5 concurrent connections.

    If a MachineID is expiring on a regular basis then this means the MachineID was incorrectly configured and needs to be recreated.

    Having said all the above, a MachineID may occasionally expire due to various exceptional circumstances. Therefore, a robust application should be coded defensively to handle this possibility. Both the above techniques that myself and my colleague Gurpreet mention should be included in a robust application i.e. using a password grant login to obtain a new Refresh token when:

    • receiving a response status code of 400 or 401
    • expires_in key in the Refresh Grant response is not equal to the original expires_in key

    I hope this clarifies the position on Refresh Token expiry


Answers