Overriding plugin service

System Information
  • Strapi Version: 4.5.3
  • Operating System:
  • Database:
  • Node Version:
  • NPM Version:
  • Yarn Version:


I have found the ability (Fix/#7197/Change custom populate state to own service by juandl · Pull Request #7204 · strapi/strapi · GitHub) to override the fetchAuthenticatedUser function of the users-permissions plugin. I have just started with Strapi and I can’t find an example how to override the function. I use Typescript and have created a users.js/ts file in the extensions/users-permissions[/server]/services folder and have tried every conceivable way to override the function, but my function is never called. Can anyone tell me how to use Typescipt to override the function?