Creating an OAuth 2 Provider (via the 'Configure OAuth Provider' Common Task) in a sub-realm displays an error if the 'OIDC Claims Script' in the global settings as has been changed from the default.
1). Create a new custom OIDC Claims Script in the top level realm.
2). Under Configuration > Global > OAuth2 Provider set the 'OIDC Claims Script' field to the new custom script.
3). Create a sub-realm and then click the Configure OAuth Provider > Configure OAuth 2.0 common task. Keep the defaults and click Create. The following error is seen in the browser:
From the Configuration debug log:
A more informative error dialog should be presented so the end-user can identify the source of the issue or a more complete fix would allow this scenario to complete.