You need to sign in to do that
Don't have an account?
Mohan Palaniappan
How per-user named credential works when called from Asynchronous Apex?
We want to use Named credentials with per-user identity and JWT Token Exchange for API authentication from Salesforce to an external API. The user's email ($User.Email) or some other user info will be passed in the "Per User Subject". This will help the external service to identify the user accessing the functionality and apply some controls in their side.
We will be referring these named credentials from Apex code, so what will happen when we use this named credential from future or queueable apex that is triggered from a User context? Will it be able to still pick the correct $User details?
We will be referring these named credentials from Apex code, so what will happen when we use this named credential from future or queueable apex that is triggered from a User context? Will it be able to still pick the correct $User details?
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks.