Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 10 | |
| 10 | |
| 4 | |
| 3 | |
| 3 |