feat: fetch SAP userid by remote_id_field_name #88
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For SAP customers leveraging Auth0 for SSO , the UID value returned in the SAML response represents the Auth0 User ID, not the SAP User ID. However, SAP integrations require the SAP User ID to properly report learner activity and completions. To support this, these changes introduce logic to fetch the SAP User ID from UserSocialAuth records, using the relevant remote user ID attribute (the attribute that Auth0 returns as the SAP User ID).
This attribute name can be provided as a query parameter to the UserMapping API, which will then retrieve the correct ID.
Related work:
Note: These changes are made only to support existing SAP + Auth0 customers.
We cannot alter current learner UIDs because such changes would directly impact authentication and SSO flows. For new SAP customers using Auth0, the recommended approach is to configure the User ID attribute in SAMLProviderConfig to directly pass the SAP User ID attribute returned by Auth0.
JIRA:
Merge checklist:
Check off if complete or not applicable: