function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rohit Soni 35Rohit Soni 35 

AccessToken for the federated user from Apex action from Bot

Hi,

I am trying to fetch the AccessToken of the current user logged in (using federation) , by running the Apex Code- 

Auth.AuthToken.getAccessToken(....)

This Apex code is invoved as a "Invocable" method from the Bot using Apex Action , its returning the AT corresponding to the user chosen as. a Bot User in the Bot config , and if the Chat Bot. user is choosen , then AT is null , I want the AT corresponding to the current logged in user , instead of the user being used to run the Bot, can someone please provide some help here.

Thanks