nate06613
12/10/2025, 1:11 PMAccessPolicy/${accessPolicyId},
display: Object.keys(ROLE_ACCESS_POLICIES).find(key => ROLE_ACCESS_POLICIES[key] === accessPolicyId) || 'Sleep Tech',
},
scope: 'project',
admin: isAdmin,
mfaRequired: false
});
and it does create a userSecurityRequest which triggers a bot that sends an email with the userSecurityRequest ID and secret which is properly exchanged to set the users password.
Here is a screenshot of the login failing as well as their project membership and user.
I have been beating my head against this for serveral days now and any help would be very appreciated.
https://cdn.discordapp.com/attachments/1448301111155884042/1448301111483043840/image.png?ex=69415a85&is=69400905&hm=a6f659d66658c4f28ed0b7a6b0dac03a50d6c4e9588fb2dbee359d5a292fb4bf&
https://cdn.discordapp.com/attachments/1448301111155884042/1448301112129097849/image.png?ex=69415a85&is=69400905&hm=880d68fa932238b275408e847ed8e2243a95fbf92153b109fef8f10749e60fb8&
https://cdn.discordapp.com/attachments/1448301111155884042/1448301112456249344/image.png?ex=69415a85&is=69400905&hm=5d6e51c682961faf889665bb182a8ae87b67749649b5fe51cc269919bc624d00&finnbergquist
12/10/2025, 5:55 PM.../login request?nate06613
12/10/2025, 5:56 PMnate06613
12/10/2025, 6:03 PMfinnbergquist
12/10/2025, 6:26 PMprojectId on yout login request matches the project on your User.project field?finnbergquist
12/10/2025, 6:29 PMI created directly instead of through the invite
Under the hood, the medplum app actually calls the same .../invite endpoint.
Maybe inspect the network call that the medplum app is making, which is working, and cross reference that with the one that you are calling via APIfinnbergquist
12/10/2025, 6:30 PM.../login. Are you authenticating with a User or ClientApplication within the project you are inviting the new User to?nate06613
12/10/2025, 7:09 PMfinnbergquist
12/10/2025, 7:10 PMfinnbergquist
12/10/2025, 7:12 PMmedplum.invite for new Users?nate06613
12/10/2025, 7:14 PMnate06613
12/10/2025, 7:15 PMnate06613
12/10/2025, 7:18 PMfinnbergquist
12/10/2025, 10:28 PMfinnbergquist
12/10/2025, 10:31 PM.../invite endpoint should create both the project scoped User & ProjectMembership.
If either is missing or misconfigured, then you will not be able to login with that Usernate06613
12/10/2025, 10:42 PMnate06613
12/11/2025, 3:03 AM${baseUrl}/admin/projects/${projectId}/invite instead of the medplum core and i still have the same issue. The request bodies are identical. and both are using an admin token generated from loggin in with a client id and secret then getting a token from /oauth2/token and then using that token to send the request. It works fine in one flow. 100% of the time the other flow it creates the user the practitioner the userSecurityRequest, the membership everything. But when i go to log in "user not found" always comes up. Sorry, I just have never run into something like this where it feels like i am doing the exact same thing in 2 places but getting different results with no visible way to tell the difference between the users or any error message that makes sense. Like the user is there. 100% its there, I am staring right at it. why is it saying its not found?nate06613
12/11/2025, 4:30 AMnate06613
12/11/2025, 4:30 AMrahul1
12/11/2025, 4:18 PMnate06613
12/11/2025, 4:29 PMrahul1
12/12/2025, 7:20 PMnate06613
12/15/2025, 3:03 PM