After entering the instance name the user sees below screen , this issue appears even before the login process
Madrid / Mobile Agent App
In this case in the table Application registries (oauth_entity) the record ServiceNow Agent was missing.
- Go to an OOB Madrid instance.
- Go to oauth_entity table (Application Registries)
- Export the ServiceNow Agent Registry record
- Import it in the affected instance
- Try to login using the agent App