Hi @Pablo Glomby ,
SharePoint CSOM/Rest API can only get the SharePoint site groups.
For the joined Teams and the Group based site url, it's necessary to use Graph API.
And in the Graph API, it's necessary to register a Azure AD App, using only username and password, it's not supported to authenticatio user, here is a similiar question for your reference:
A different point in the request would be using /users/{user-id}/joinedTeams instead of /me as using the app-only permission, /me is not available as it's not a real user.
Here is a code demo about register Azure AD App and connect with C# code, please refer:
How To Access Microsoft Graph API In Console Application
Thanks
Best Regards
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.