I am creating the accesstoken using below command:
Get-ADALAccessToken -AuthorityName exterrobiz.onmicrosoft.com -ClientId a0c73c16-a7e3-4564-9a95-2bdf47383716 -ResourceId https://ps.compliance.protection.outlook.com/PowerShell-LiveId -RedirectUri "urn:ietf:wg:oauth:2.0:oob" -ForcePromptSignIn
It will provide the access token. Using this token I can able to perform the security and compliance operation.
Received token is valid for 1hr and I want to renew the accesstoken automatically without user intervention. I have refresh token and ID token received in the above result (able to read from cache). How can I get the new access token with the available refresh token?
I am using application client id (a0c73c16-a7e3-4564-9a95-2bdf47383716) provided by Microsoft and there is no secret key to hit the endpoint to refresh the accesstoken.
I am unable to get the solution to achieve this.