Okta Java SDK Client cache refresh

@Lijia Hello, I am afraid this is not what I am looking for or I do not understand it or know how to implement it.

Current behaviour:

client = Clients.builder()
    .setOrgUrl(url)
    .setClientId(clientId)
    .setScopes({"okta.users.read", "okta.users.manage"})
    .setClientCredentials(new TokenClientCredentials(apiKey))
    .build();

print(client.getUser(userId).Profile.getString("attributeName")) // prints "123"

// here there is a change of the attribute in webpage admin panel for that user to "456"

print(client.getUser(userId).Profile.getString("attributeName")) // prints "123"

I would expect the second print to print “456”

1 Like