Identifying via Chrome extension the Signed-In Google Users in a spesific Tab when Multiple Accounts Connected

I’m currently developing a Chrome extension that interacts with web applications, including the Google Cloud Platform (GCP). One of the challenges I’m facing involves identifying the specific Google account that is signed in to a particular tab within the application. This is relevant when users sign in to GCP with multiple Google accounts across different tabs within the same Chrome browser session.

My goal is to identify the specific Google account that is signed in to a particular tab within the GCP application.

I’ve explored the chrome.identity.getProfileUserInfo API, but it seems to provide information about the user profile that is signed in to the entire Chrome browser, rather than the user associated with a specific tab.

Additionally, I’m considering using JavaScript to extract user information from the profile circle in the top right corner, which displays user icons and details. However, I’m concerned that relying on a specific web page element might lead to issues if the layout changes in the future.

Is there a way to achieve this granularity within a Chrome extension? I want to display the currently signed-in user’s information.