Okta Error Occurs When Provisioning Users to HubSpot
Last Updated:
Overview
An error occurs when provisioning users from Okta to the HubSpot application because administrators manually created attributes on the HubSpot application profile before enabling provisioning. Disabling provisioning, removing all custom attributes, and re-enabling provisioning generates the correct base attributes and resolves the error. When provisioning users from Okta to HubSpot, the Okta provisioning tasks fail. The HubSpot profile lacks the externalName and externalNamespace definitions, even when attributes like givenName and familyName appear correctly mapped in the Profile Editor.
The following error message appears in the task details:
An error occurred while assigning this app. Automatic provisioning of user user@example.com to app HubSpot failed: Error while creating user user@example.com: Bad Request. Errors reported by remote server: User with email user@example.com should have given name and family name
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- HubSpot
- System for Cross-domain Identity Management (SCIM) Provisioning
Cause
Administrators manually created attributes on the HubSpot application profile in Okta before enabling provisioning. When administrators add the HubSpot application from the Okta Integration Network (OIN), Okta disables provisioning by default. If administrators manually create attributes like givenName and familyName at this stage, Okta creates them as custom attributes. These custom attributes lack the required System for Cross-domain Identity Management (SCIM) metadata (externalName and externalNamespace) needed to communicate with the HubSpot API because provisioning remains disabled.
When administrators later enable provisioning, Okta migrates the application profile to a provisioning-enabled profile and preserves the existing custom attributes. This migration preserves the custom schemas assigned before enabling provisioning. Because these custom attributes share the same variable names as the base attributes in the template, the attributes assigned before provisioning become base attributes after provisioning. The provisioning process then fails because these carried-over attributes lack the critical externalName and externalNamespace metadata.
Solution
What steps resolve the HubSpot provisioning error?
Disabling provisioning, removing all custom attributes, and re-enabling provisioning generates the correct base attributes and resolves the error.
- Navigate to the Okta Admin Console.
- Go to Applications and select the HubSpot application.
- Navigate to the Provisioning tab and select Integration.
- Click Edit and clear the Enable API integration checkbox to disable provisioning.
- Click Save.
- Navigate to Directory and select Profile Editor.
- Select the HubSpot application profile.
- Delete the custom attributes that administrators manually created before enabling provisioning.
- Return to the HubSpot application Provisioning tab and select Integration.
- Click Edit and select the Enable API integration checkbox to re-enable provisioning.
- Click Save. Okta generates the correct base attributes for the HubSpot application.
