title: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token
body: <p>Why I am not able to call graphClient more then once?</p>
  <p>Code:</p>
  <pre><code>public static void initializeGraphAuth(String authorizationCode) {
              
              List&lt;String&gt; scopes = new ArrayList&lt;&gt;();
              scopes.add(&quot;https://graph.microsoft.com/mail.read&quot;);    
              // Create the auth provider
              final AuthorizationCodeCredential authCodeCredential = new AuthorizationCodeCredentialBuilder().clientId(AzureConstants.CLIENT_ID).clientSecret(AzureConstants.CLIENT_SECRET).authorizationCode(authorizationCode)      .redirectUrl(AzureConstants.REDIRECT_URI).build();
              
              authProvider = new TokenCredentialAuthProvider(scopes, authCodeCredential);
      
              // Create default logger to only log errors
              DefaultLogger logger = new DefaultLogger();
              logger.setLoggingLevel(LoggerLevel.ERROR);
      
              // Build a Graph client
              graphClient = GraphServiceClient.builder().authenticationProvider(authProvider).logger(logger).buildClient();
          }
          public static User getUserDetails() {
              return graphClient.me().buildRequest().get();
          }
      
          public static List&lt;Group&gt; getUserGroups() {
              GroupCollectionPage groups = graphClient.me().transitiveMemberOfAsGroup().buildRequest().get();
              return groups.getCurrentPage();
          }
  </code></pre>
  <p>In main app I am calling getUserDetails() and getUserGroups() methods to get users details and group details respectively. Able to get User details but not group details below is the error</p>
  <pre><code>com.microsoft.aad.msal4j.MsalInteractionRequiredException: AADSTS54005: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token.
  Trace ID: 48d1fee1-cb8b-48c6-a7ec-91e2b2057500
  Correlation ID: c58388ec-417c-4398-82ee-68910568f4df
  </code></pre>
  <p>If i call only one method either getUserDetails or getUserGroups its is working fine, but when i call both methods in code it is giving error</p>
  <p>How can i use graphClient object to get user and group details both??</p>
  <p>Thanks for your help</p>