Enterprise-Ready Workshop: SCIM

Hello SaaS developers! You sell your software to technologically mature enterprises, and they expect it to interface seamlessly with all their other tools. In our Enterprise-Ready Workshop on OpenID Connect, you learned how to solve part of this problem, by creating user accounts in your application for your customers’ employees whenever they log in.

This is a companion discussion topic for the original entry at https://developer.okta.com/blog/2023/07/28/scim-workshop

Hello there, The issue mentioned at 19:25 in the workshop video is occurring even after adding the bodyParser code in main.ts. I’m on npm 20. Wondering if it has anything to do with the “unable to load tsconfig-paths”? As of today there are no open issues on Github related to this

@alisaduncan appreciate if you can help here as well :slightly_smiling_face:

Hi there @tech-binder !

Thanks for the nudge and for working through the workshop! I haven’t tried this on Node 20, but my guess is it’s not a Node version (I could be mistaken though). Let’s see if we can figure this out together. :slight_smile:

Double checks never hurt, so why don’t we start by clearing out dependencies, re-installing the dependencies, and resetting the tooling. Please run the following commands to do so

rm -rf node_modules
npm ci
npx nx reset

Does that resolve the error you’re seeing with the content-type parsing?

If not, the next step is verifying the completed project runs on your machine. Please try cloning the project to a new location on your machine, then checkout the completed branch for the SCIM workshop to run it locally and ensure it works:

git clone git@github.com:oktadev/okta-enterprise-ready-workshops.git
git checkout scim-workshop-complete
npm ci
npm run init-db
npm start

Let us know what you see! If you’re still running into trouble, I’m happy to try installing Node 20 or to set up an office hours call to troubleshoot.

Hi @tech-binder, can you try updating line 177 to the following instead app.use(bodyParser.json({ type: 'application/scim+json' })); and see if the error goes away?

@sigama thanks your response. After I reinstalled the dependencies as suggested by @alisaduncan it works with both either of the code samples

app.use(bodyParser.json({type: [‘application/json’, ‘application/scim+json’]}));


app.use(bodyParser.json({ type: 'application/scim+json' }));

@alisaduncan thanks a ton. Reinstalling the dependencies fixed it!

1 Like

Awesome! Glad to hear it! Let us know if you run into anything else. Happy coding!