This tutorial will show you how you can use your and your friend's Plex login to login to Nextcloud.
If you use unRAID you can add https://github.com/Starbix/docker-templates to your template repositories if you want to use the docker template.
You need to enable
LDAP user and group backend in Nextcloud which is an official app.
LDAP user and group backendsettings and set like the following pictures:
Use the IP your LDAP for Plex instance runs on
Note: It doesn't add the Plex users to the Plex.tv group automagically, you need to do that manually.