Hi, @Panos Chronopoulos
Looks like the issue is more related to JavaScript API. Please kindly understand that the Exchange Online Management tag here we mainly focus on general issues about Exchange. To better solve your problem, I will add JavaScript API tag for you.
Based on my personal advice, the current approach to handling this transition is to migrate to the Graph API. Legacy Exchange tokens, including those obtained via getCallbackTokenAsync, are being deprecated and will begin shutting down in February 2025. This means that the recommended path in the future is to migrate your add-in to use the Microsoft Graph API, which provides better security and greater application architecture flexibility.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".