Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
gooranga1
Power Participant
Power Participant

Error Message: The specified key is not the valid size for this algorithm

Hi,

 

I have a xlsx spreasheet that I have inherited that connects to files on sharepoint. Initially this worked ok for me I can get access to the folders.

 

But now I am getting an error message when attempting to connect to the folders

 

Error Message:
The specified key is not a valid size for this algorithm.
Parameter name: key Key length: 40

 

Even if I try to attempt to create a new connection I get the same error in Excel. If I make the connection in Power BI Desktop it works fine. But it will not work in Excel.

I have deleted the cache folders to no avail and no I am stuck!

 

AppData\Local\Microsoft\Power BI Desktop\Cache

AppData\Local\Microsoft\Power BI Desktop\CEF\cache\Cache

 

Not sure what is messing up the Excel connection has anyone else had this issue with Excel?

4 REPLIES 4
v-gizhi-msft
Community Support
Community Support

Hi,

 

You should also delete one cache folder under Microsoft folder but not only under Power BI Desktop folder.

 

Best Regards,

Giotto

Hi @v-gizhi-msft 

 

I had seen a post that said this but I don't have a cache folder in the Microsoft folder to delete?

 

No Cache folder to deleteNo Cache folder to delete

There is another folder that needs deleting. It's now fixed.

 

C:\Users\<username>\AppData\Local\Microsoft\Office\16.0\PowerQuery\Cache

 

This was posted by @jazz  in this post https://community.powerbi.com/t5/Desktop/Unexpected-error-The-specified-key-is-not-a-valid-size-for-... 

 

 

 

Greg_Deckler
Community Champion
Community Champion

Somebody posted about this recently, I think they had to change the api version or something associated with their sharepoint connection. Try searching for that error in the forums. You could check the Issues forum here:

https://community.powerbi.com/t5/Issues/idb-p/Issues

And if it is not there, then you could post it.

If you have Pro account you could try to open a support ticket. If you have a Pro account it is free. Go to https://support.powerbi.com. Scroll down and click "CREATE SUPPORT TICKET".



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors