'Get OAuth Token' from an OAuth 2.0 credential record throws the error "Unsupported OAuth grant type 'Authorization Code'" and doesn't initiate the OAuth request. DescriptionThe UI action 'Get OAuth Token' on the oauth_2_0_credentials table expects the grant type to be in the form 'authorization_code' and since it doesn't match, it throws this error.The grant type is retrieved from the scratchpad and the value in the scratchpad is set from the business rule 'Set OAuth info on scratchpad' on the oauth_2_0_credentials table.Steps to Reproduce 1. Setup an OAuth application Registry & profile.2. Create an OAuth 2.0 credential from the discovery_credentials table. 3. Click on 'Get OAuth Token'. WorkaroundThe workaround/fix is a simple fix to the business rule script.https://<instance-name>.service-now.com/nav_to.do?uri=sys_script.do?sys_id=6a3ec3f3b30b3200176b051a16a8dca2 OLD:g_scratchpad.grant_type = current.oauth_entity_profile.grant_type; NEW:g_scratchpad.grant_type = String(current.oauth_entity_profile.grant_type);Related Problem: PRB1381872