Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi, I am getting this error when trying to connect an Azure Storage datalake V2 table to Power BI.
Can anyone please explain what this means or what the solution is
Solved! Go to Solution.
Hi, @MartinaHawkins
The error message “Index was out of range. Must be non-negative and less than the size of the collection” typically indicates that an invalid index has been used when accessing a collection, such as an array or list. Specifically, this means that the index you are trying to access is either negative or exceeds the size of the collection.
I have looked into several solutions for similar issues you might be facing, and you can try the following steps:
1.Firstly, please check that the URL you have entered for Data Lake Storage Gen2 meets the required specifications.
Here is a screenshot from the relevant documentation:
For further details, please refer to the documentation.
Azure Data Lake Storage Gen2 - Power Query | Microsoft Learn
Analyze data in Azure Data Lake Storage Gen2 by using Power BI - Power Query | Microsoft Learn
2.Secondly, ensure that the correct ports are open for your network/firewall.
For more information, please consult the documentation.
Azure AD Connect Error - ArgumentOutOfRangeException: Index was out of range - Microsoft Q&A
3.Next, based on another document related to the same error, you might also consider upgrading Az.Resources to see if that resolves the issue:
For detailed guidance, please refer to the documentation.
PowerShell Gallery | Az.Resources 7.5.0
4.Finally, you could try changing the account privileges to see if that helps resolve the problem.
Azure AD Connect Error - ArgumentOutOfRangeException: Index was out of range - Microsoft Q&A
Microsoft Entra Connect: Accounts and permissions - Microsoft Entra ID | Microsoft Learn
Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @MartinaHawkins
The error message “Index was out of range. Must be non-negative and less than the size of the collection” typically indicates that an invalid index has been used when accessing a collection, such as an array or list. Specifically, this means that the index you are trying to access is either negative or exceeds the size of the collection.
I have looked into several solutions for similar issues you might be facing, and you can try the following steps:
1.Firstly, please check that the URL you have entered for Data Lake Storage Gen2 meets the required specifications.
Here is a screenshot from the relevant documentation:
For further details, please refer to the documentation.
Azure Data Lake Storage Gen2 - Power Query | Microsoft Learn
Analyze data in Azure Data Lake Storage Gen2 by using Power BI - Power Query | Microsoft Learn
2.Secondly, ensure that the correct ports are open for your network/firewall.
For more information, please consult the documentation.
Azure AD Connect Error - ArgumentOutOfRangeException: Index was out of range - Microsoft Q&A
3.Next, based on another document related to the same error, you might also consider upgrading Az.Resources to see if that resolves the issue:
For detailed guidance, please refer to the documentation.
PowerShell Gallery | Az.Resources 7.5.0
4.Finally, you could try changing the account privileges to see if that helps resolve the problem.
Azure AD Connect Error - ArgumentOutOfRangeException: Index was out of range - Microsoft Q&A
Microsoft Entra Connect: Accounts and permissions - Microsoft Entra ID | Microsoft Learn
Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
7 | |
2 | |
2 | |
1 |
User | Count |
---|---|
3 | |
3 | |
3 | |
2 | |
2 |