Hello @elin Weidemann,
I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.
Issue: How to fix 'Argument-out-of-range-exception: Length cannot be less than zero, Parameter name: length' error in Entra connect.
Solution: Resolved by elin Weidemann. Please refer below steps for solution.
Hey again, just wanted to say the solution was found. With the help from a friend I found out I had to skip the "create a tenant" part of the tutorials i have read. (And that my subscription came with its own tenant that I can use.)
Because of my Subscription (Azure for students) or license I can't choose 'Microsoft Entra ID' as a tenant type, and therefor chose 'Azure AD B2C', and that does not work with Entra Connect.
So this was a good learning experience, in how important propper research is :)
If you have any other questions or are still running into more issues, please let me know. Thank you again for your time and patience throughout this issue.
Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.
Thanks,
Raja Pothuraju.