Created
October 10, 2023 20:38
-
-
Save levancho/e43781e0e83b1699c390ea9ffadb1d61 to your computer and use it in GitHub Desktop.
MSAL4j public
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PublicClientApplication app = PublicClientApplication.builder("YOUR_CLIENT_ID") | |
.authority("https://login.microsoftonline.com/YOUR_TENANT_ID") | |
.build(); | |
RefreshTokenParameters parameters = RefreshTokenParameters.builder( | |
Collections.singleton("YOUR_SCOPE"), | |
"YOUR_REFRESH_TOKEN") | |
.build(); | |
Future<IAuthenticationResult> future = app.acquireToken(parameters); | |
IAuthenticationResult result = future.get(); | |
String newAccessToken = result.accessToken(); | |
System.out.println("New Access Token: " + newAccessToken); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment