How to fix 'Argument-out-of-range-exception: Length cannot be less than zero, Parameter name: length' error in Entra connect.

elin Weidemann 0 Reputation points
2024-11-30T13:08:11.23+00:00

Hi, I'm doing a school assignment where I will migrate a server Azure using Microsoft Entra Connect, in VMWare. I keep getting this error 'Argument-out-of-range-exception: Length cannot be less than zero, Parameter name: length', and do not know what to do. It appears after I have put in credentials to Global Admin user in tenant, and it is trying to connect.

Tried troubleshooting on the internet but couldn't find something this particular problem. And I am also really new with PC, would appreciate all the help I can get.

Appended the log, in case someone understand some of what it says :)

Elin

error.jpg

errorlog.jpg

Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

3 answers

Sort by: Most helpful
  1. Michael Taylor 60,161 Reputation points
    2024-11-30T16:30:41.7266667+00:00

    The error message indicates you have not properly set up your tenant for use with Entra connect. Go back to your tenant configuration and make sure everything is correct. The logs indicate it gets to the tenant and then fails when trying to read some of the tenant data because it is improperly formatted. Unfortunately a screenshot of the log doesn't allow us to see the actual error information. In general you should attach the actual log file rather than a picture, after you redact sensitive information.

    So the tenant itself seems accessible but it fails when trying to read in the tenant data it needs. Specifically it says placeholder which leads me to believe you might not have fully set up your tenant yet.


  2. elin Weidemann 0 Reputation points
    2024-12-02T14:35:49.6866667+00:00

    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 :)

    • Elin Weidemann
    0 comments No comments

  3. Raja Pothuraju 23,465 Reputation points Microsoft External Staff Moderator
    2024-12-09T05:26:41.1833333+00:00

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.