Custom User Data FunctionNotFound Error


I am trying to run a setup function to create some documents after a user signs up. I set the function under App Services → App Users → Custom User Data → User Creation Function

But when I try to sign up the function I specified in User Creation Function is not found. I"m not sure why it happens or how to fix it. Does anyone have any ideas?

I’m using the Custom Function Authentication Flow.

I’m having the exact same issue.

I went through the Custom User Data tutorial and selected a new user creation function with the default name “onUserCreation”. After saving, I can see it listed with my other functions. However, when I try to create a new account the logs show the error “function not found: ‘onUserCreation’” and the function is never called.

I ran into this same issue as well, managed to solve it by changing the following configuration settings:

NOTE: (see Edit 1)
Previously, I had set my Authentication to Application Authentication and Private to true.

Edit 1:
After some testing, you can leave Authentication to Application Authentication; just make sure Private is set to false.

Thanks. That did work however it would seem that it should be private so that clients can’t call into this function. Would be good to hear from the MongoDb team on it.

Thanks again!

Yh, same thing here. It should be private to prevent that the function is called manually.