We are trying to include user's id as part of LTI launch payload in D2L.
This is what we are getting as the user_id field:
{
"user_id": "0d45101e-230a-4c06-9008-0024a52038fc_1914"
}
We only want the last DB id field portion. In the attempt to include it as a separate custom parameter, we found that there's doesn't seem to be a very good way to do that, other than checkbox options for allowed params. Is there a way to achieve that?
Creating new custom link seems to have the option to provide the custom parameter. But looks like there are mostly for hard-coded values and can't seem to find template form to provide dynamic values there.
Otherwise, only another fallback option for us is to parse this id and get the last part as our desired identifier, which is our last choice.
Any help/suggestions are appreciated. Thanks!
Your assumptions are correct, this cant be done. the system user ID is not sent with the LTI request, other than in the user_id field as you already know. Custom parameters are indeed hard-coded and cant be used to send dynamic/per user data. This has been asked before with no answer How to Assign Dynamic Values to Custom Parameters in D2L Basic LTI
Splitting the user_id field on the underscore to extract the system user ID is the only option.