Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Managed Users #32

Open
cglatot opened this issue Oct 28, 2020 · 13 comments
Open

Support Managed Users #32

cglatot opened this issue Oct 28, 2020 · 13 comments
Assignees
Labels
enhancement New feature or request

Comments

@cglatot
Copy link
Owner

cglatot commented Oct 28, 2020

Is your feature request related to a problem? Please describe.
Support Managed Users within plex. Some details: https://www.reddit.com/r/PleX/comments/jjljpo/tired_of_changing_audio_and_subtitle_tracks_for/gadilyi/

@cglatot cglatot added the enhancement New feature or request label Oct 28, 2020
@cglatot cglatot self-assigned this Oct 28, 2020
@blacktwin
Copy link

In order to sign in as a Managed user from the admin's account you will need the user's accessToken. All shared users' accessToken can be viewed from https://plex.tv/api/servers/{machineId}/shared_servers?X-Plex-Token={ADMIN_TOKEN}. With the accessToken from the user you can sign in to the server as the user. From there you can do what you want. Hope that helps.

@cglatot
Copy link
Owner Author

cglatot commented Feb 3, 2021

In order to sign in as a Managed user from the admin's account you will need the user's accessToken. All shared users' accessToken can be viewed from https://plex.tv/api/servers/{machineId}/shared_servers?X-Plex-Token={ADMIN_TOKEN}. With the accessToken from the user you can sign in to the server as the user. From there you can do what you want. Hope that helps.

This API endpoint only seems to give who the server was shared with - it does not include the managed accounts if those accounts are owned by the server admin (it doesn't even show the admin account here).

@ukdtom
Copy link

ukdtom commented Aug 13, 2021

@cglatot

@blacktwin is correct here, since it'll return users it's shared with, but problem here is that you doesn't see the users name :(

So when gathering a list of all the users, with a blank username or email, you can look at their id
Then compare that with the list you can get from https://plex.tv/api/users, and the managed users name is in the title field

@Tyestor
Copy link

Tyestor commented Dec 1, 2021

any progress on this? this tool is amazing for single-user changes (usually just the admin), but it would be even better if I could change all audio and subtitle default preferences for all users in one fell swoop.

@vtruong68
Copy link

This would be a useful feature to implement. In the meantime, blacktwin's accessToken workaround is what I'm using for my one managed user. I can see how it would be difficult for others with more managed users as you would have to further dig into their userID to figure out whose settings you're changing.

@twinkie0101
Copy link

twinkie0101 commented Dec 30, 2021

This would be a useful feature to implement. In the meantime, blacktwin's accessToken workaround is what I'm using for my one managed user. I can see how it would be difficult for others with more managed users as you would have to further dig into their userID to figure out whose settings you're changing.

@vtruong68, Would you mind ELI5 on how you got this to work? It's my understanding managed users don't get tokens. I've tried using the link above and incorporating my machine ID and admin plex token, but I get a 404 error for https://plex.tv/api/servers/{machineId}/shared_servers?X-Plex-Token={ADMIN_TOKEN}

Thanks!

@vtruong68
Copy link

@twinkie0101

A 404 error sounds to me more like you aren't even hitting the Plex API and maybe typed something in wrong. I copy and pasted your link and it works fine for me. Are you excluding the curly brackets "{ }"?

I grabbed my machine ID by navigating to a specific episode or movie in Plex. https://app.plex.tv/desktop/#!/server/{machineID}/details?key=...
For the admin token, I followed the following instructions while logged in as my admin user: https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/

Plugged those in to https://plex.tv/api/servers/{machineId}/shared_servers?X-Plex-Token={ADMIN_TOKEN} and got an XML with the user accessToken information.

@twinkie0101
Copy link

Thanks for your response. I've got my token and deleting the { } in my url. I am wondering if I am using the appropriate machine ID. I used tautulli to get that info plex server url. My machine ID is ipaddress with - instead of . (e.g. XXX-XXX-XX-X) followed by a string of characters (and see the same info viewing the XML data). So my url looks something like this:

https://plex.tv/api/servers/XXX-XXX-XX-XX.string of alphnumeric characters.plex.direct:32400/shared_servers?X-Plex-Token=XXXXXXXXXXXXX

But keep getting the 404 error.

@hugo-id
Copy link

hugo-id commented Apr 15, 2022

Hey guys, this feature would be a really big deal for me. I'd been blithely updating the settings for my media, and was shocked when my friends reported that audio/subtitles never worked right

Personally, I'd like to see users handled like so:
image

And then from that point onwards it all works the exact same.

I only really have experience with programming for embedded applications, so let me know if there's some way I can help. I'm also prepared to put a money bounty on this if that helps (I can barely code) as this is such a massive deal for me.

@cglatot
Copy link
Owner Author

cglatot commented Apr 15, 2022

Hey guys, this feature would be a really big deal for me. I'd been blithely updating the settings for my media, and was shocked when my friends reported that audio/subtitles never worked right

Personally, I'd like to see users handled like so:

And then from that point onwards it all works the exact same.

I only really have experience with programming for embedded applications, so let me know if there's some way I can help. I'm also prepared to put a money bounty on this if that helps (I can barely code) as this is such a massive deal for me.

If your friends and family are using their own accounts (I.E. Not "managed accounts") then this is impossible. They would need to login with their own account details and do it themselves.

If they are all Managed Accounts, then this is what this issue will hopefully solve when I get some time to properly look at it agian.

@bleugray
Copy link

any updates or temporary solutions that work for managed users?

@cglatot
Copy link
Owner Author

cglatot commented Jun 16, 2022

Unfortunately no, I haven't had time at all for PASTA for the past while.

I did see this workaround someone posted on Reddit, however: https://www.reddit.com/r/PleX/comments/u1qos5/anyone_know_if_using_pastatool_affects_other/i4e3x4t/

I haven't tried it myself just yet - but I have it saved for reference material when I can eventually get around to trying to solve this in-app.

@ukdtom
Copy link

ukdtom commented Jul 27, 2022

If your friends and family are using their own accounts (I.E. Not "[managed accounts](https://support.plex.tv/articles/203948776-managed-users/)") then this is impossible

Actually, as a server owner, you can get the access token your users use to logon to your server.
Then use that to logon, and set the things needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants