+ Start a Discussion
Piyush NandrekarPiyush Nandrekar 

With sharing is not getting applied to GLOBAL CLASS ( Custom API ) ? How to fix it ?

I have created one global class ( custom REST API ) and have applied "With Sharing" on that global class. However , with sharing is not getting applied to that class .
if i call that Custom API with user ( having access on Custom API/class )  from postman , i can see all data regardless of CRUD Permissions , FLS , record level access.
How to overcome this ? Am i missing anything here.

I would like to allow access to data only that user have , and not anything else.