Refresh token for M2M applications

Problem statement

From dev tenant I went to Applications, then Machine to Machine application, after thatRefresh Token Expiration, I toggled the “Absolute Expiration” on and set absolute lifetime to 7344000 but I can’t turn it on. If I choose the Native application, it works.

May I ask how to turn this on for the “machine to machine” application?

Solution

Refresh tokens don’t make sense for M2M flows. The client has the client ID and secret, so it can request a new token whenever it requires one.

Refresh tokens are used when a user is involved in the flow, and the client requires new access tokens when the user’s session has expired, but wants to reduce friction and get new tokens without prompting the user for their credentials again. In M2M flows, there’s no user.