I was setting up my home-assistant to integrate with plex [Plex Media Server - Home Assistant] and in doing so I saw several unknown users associated with my account. These were identified as users with access to my PMS.
The Home Assistant integration has a feature where it lets you monitor each of your Plex users in its dashboard. When I set it up I saw several unknown Plex user accounts associated in some way with my plex account.
I checked my sharing settings to confirm they were not there : (https://app.plex.tv/desktop#!/settings/users-sharing).
In the Home Assistant integration, it calls these folks Monitored users : A list of accounts with access to the Plex server.
Iām attaching a screen shot of the users it was able to pull from my account via the api integration, but I can not see how to remove these folks.
Any idea how I can view and delete these users from My Plex account?
The ones with the red arrows are not known to me:
[again, and they do not appear in !/settings/users-sharing).]
Server Version#:Version 1.21.4.4054
Player Version#: 4.51.3
First thing I would do, is change your Plex Account password. Not too sure how to remove the users if they donāt appear in the global list however.
Either way your password should be changed as it seems like someone has hacked your account and added accounts without your knowledge.
Home Assistant is not a Plex product.
So it is totally unclear what they are doing to build this list of āmonitored usersā.
Apparently they are doing some guess work, based on some unknown parameters.
None of these user names has access to your Plex server.
To clear up this mystery, we need to know how HA is compiling this list.
First, thanks for the quick reply. Also to clarify, the issue appears that shared users still appear / can be seen through the plex api after they are deleted.
I replicated by creating a āfriendā activating, then deleting the friend, and verifying that the deleted account is still exposed via the api.
From the HomeAssist plex documentation and in looking at the code {Source: View on GitHub } I can see that it uses plexapi 3.4.1, and from :
plexapi.myplex.MyPlexAccount they receive the set of accounts, which evidently also includes users who have been previously removed.
Here is a snippet from their python (server.py):
@property
def accounts(self):
"""Return accounts associated with the Plex server."""
return set(self._accounts)
account.name for account in system_accounts if account.name
]
**_LOGGER.debug("Linked accounts: %s", self.accounts)**
So can you confirm that every user in the above screenshot had, at some time in the past, access to your server (or older servers in your account)?
Thatād be an important data point.
Home Assistant Plex integration maintainer here. This list of users is generated from the PMS /accounts endpoint which seems to include all users that have (or had) access. I havenāt found a way to determine if a given user has had their access removed without querying plex.tv, so maybe that will be necessary.
@OttoKerner , Confirming that the users in the screenshot had access at one time, but had since been deleted.
i.e., based on @jjlawren comment, they remain in the list of users in the PMS /accounts endpoint without any /active/inactive indicator.
Can confirm the following. Users added to server, then deleted remain exposed via: (screen shot 1 shows 5 examples)
https://<PLEX_SERVER>:32400/accounts?X-Plex-Token=xxxxxxx
Can confirm that ONLY active users are shown at the plex.tv level: (screen shot 2)
https://plex.tv/api/users/?X-Plex-Token=xxxxxx
Would think it a good practice to remove deleted members from ācom.plexapp.system.accountsā as well.
Five deleted users remain here: (https://<PLEX_SERVER>:32400/accounts?X-Plex-Token=xxx)
**Correct active users here: https://plex.tv/api/users/?X-Plex-Token=xxxxxx **
Iāll fix this on the Home Assistant side.
Edit: Done.