Skip to main content
Question

Microsoft Graph API - Persistence of identifiers

  • December 22, 2025
  • 1 reply
  • 20 views

Jérémie CEDOLIN
Forum|alt.badge.img+2

Hello,


We have a DSP that allows us to send emails using the Graph API. To use this API, we use the ‘msal.js’ library, which allows us to connect to our Microsoft account before sending emails.
After the first connection to the Microsoft account, we use the ‘msalInstance.getAllAccounts()’ method, which retrieves the Microsoft connected user from the cache. This is essential for sending several emails in succession.
This DSP is used in a form through a DSPContainer, and it works very well.
Our problem is as follows: after each application restart, we have to re-enter our credentials: the ‘msalInstance.getAllAccounts()’ method has forgotten everything. As long as the application is not restarted, this method remembers the logged-in user.


Do you know if it is possible to have a persistent cache after closing? From an ergonomic point of view, it is not pleasant for the user to have to log in again each time.

 

Thank you and Happy New Year to you !

1 reply

Hello  Jérémie,


During a session, Uniface uses the operating system cache to manage its forms, services, etc. But once the Uniface application is closed, the cache is cleared.

To retain information that you want to reuse when opening a Uniface application, you can use these following methods:

1) By storing the information in a database and retrieving it when the application is restarted by the PreActivate trigger.

2) By using cookies. I've included a link to the eLearning course "State Management using Cookies":

https://learn.rocketsoftware.com/course/view.php?id=719

https://learn.rocketsoftware.com/course/index.php?categoryid=27

 

Regards

 

Aubin-Dominique Lenghat