System Administrator User is getting this exception SugarApiExceptionNotAuthorized

I have a custom integration of Sugar with another app. While accessing records using API the following error is logged. The user is a System Administrator User. Can anyone help? Thanks

Thu May 19 12:11:23 2022 [28378][-none-][FATAL] Exception in Controller: SugarApiExceptionNotAuthorized: No access to view records for module: Contacts in /mnt/sugar/12.0.0/ent/clients/base/api/FilterApi.php:327

  • could you provide how your integration is accessing the API? Your code needs to 1st obtain a token. Then when accessing Sugar it must use that token. When you obtained the token what platform are you using?

  • Hi Jeff,

    I got this issue solved. In the custom code the Global Current_user was set to Admin with User ID = 1, who was Inactive. The bean was not getting the User and thus there was no Access to records in Sugar. By changing the global user to another Active Admin User the issue got solved.