Accessing Standard API with Client Credentials Grant Authorization Flow

I’ve successfully implemented Client Credentials Grant authorization flow and it works properly for accessing the FHIR API. But when I make request to Standard Api (api/patient endpoint), I get following error in the log:
OpenEMR Error: api failed because user role does not have access to the resource {"resource":"/api/patient","userRole":"system"}

When I use any other authorization flow, I don’t encounter this issue, and everything works as expected. All scopes from documentation are included.
OpenEmr version - 7.0.2

Is is possible to access Standard API with Client Credentials Grant Authorization Flow?

Hi @Roman_Zakaliak
I understand that you have encountered issue with accessing standard API with client credentials,you can try out these steps and check,

You should provide the following scope during API client Registration and provide role as user.

Scope : openid api:oemr api:fhir api:port user/ user/allergy.write user/ user/appointment.write user/ user/dental_issue.write user/ user/document.write user/ user/ user/encounter.write user/ user/facility.write user/ user/ user/insurance.write user/ user/insurance_company.write user/ user/ user/ user/medical_problem.write user/ user/medication.write user/message.write user/ user/patient.write user/ user/practitioner.write user/ user/ user/ user/soap_note.write user/ user/surgery.write user/ user/vital.write user/ user/ user/ user/ user/ user/ user/ user/ user/ user/ user/Organization.write user/ user/Patient.write user/ user/Practitioner.write user/ user/ patient/ patient/ patient/ patient/

If you have any questions or need further assistance, please feel free to contact us at .
-ViSolve AI Team