Create Portal User

The createPortalUser function allows you to create a new portal user. Here are the required parameters and an usage example:

  • email: The email used for creating a portal user, which the user can use to log in to the portals.
  • portalContactId: Entry ID of the contact record.
  • portalRoleId: The portal role for which we are creating a portal user.
  • dataScopeEntryId: Entry ID of the datascope record.
  • portalIdentifier: The portal type for which we are creating a portal user.
async function script(C) {
    const email1 = "[email protected]";
    const payload1 = {
        email: email1,
        portalContactId: 1185813,
        portalRoleId: 1185799,
        dataScopeEntryId: 25254,
        portalIdentifier: "test-portal-1",
    };
    const response = await C.createPortalUser(payload1);
    return response;
}

Output

The following is the response of createPortalUser. You might use this information to add something to the summary.

{
"createdPortalEmployee":true,
"createdNewInternalUser":true,
"portalRoleDefaultEmailSent":true,
"createdNewAuth0User":true,
}

📌 Need Help?

If you require assistance or encounter any issues, please don't hesitate to contact us for further support.