The out of the box sample OAuth2 Access Token Modification Script contains an error. Line 75 refers to
"Remove a native field from the token entry, that was set by AM. For complete list of remove* methods see the JavaDoc for org.forgerock.oauth2.core.AccessToken class" It then lists the following method:
This method should be accessToken.removeField()
Edit OAuth2 Access Token Modification Script in attempt to remove a claim we ship by default.
Remove a specified claim
Removes name of token
Use accessToken.removeField() method instead of accessToken.removeName() method.