-
Notifications
You must be signed in to change notification settings - Fork 23
Description
There are many examples for functions that need to authenticate towards external systems on behalf of the user.
For security reasons, application permissions, i.e. permissions that allow the application (here: agent) access to the data of ANY user, are often not desirable and therefore not allowed.
A popular example is e.g. the MS Graph API for accessing M365 data, such as e-mails, files or Teams conversations. See the Microsoft documentation for the two authentication methods "delegated" vs. "application" permissions.
When using delegated permissions, there should typically be an interaction with the user through an OAuth2 flow, i.e. the user should grant access at least once through a web page.
For this to work, there must be a mechanism for an agent function to tell the calling client that an authentication token is required (and with it, it would need to pass information about the url, the requested scope(s), etc.). Once a user authorized access, the token must be fed back into the function.
I create this issue here in the Arc project to trigger the discussion on how a solution would best look like. Arc agents are then only the first step; the other LMOS components will likely have to be adapted as well to smoothly support this flow.