Sometimes this error appears
in this case you can check if you are connected with the correct credential
First of all you have to open power query:
From tab "DATA" click on query and connections, and than double click on on of the tables.
Click on " Data source Settings"
Highlight your source ad choose "Edit permission"
Click on edit and choose windows, than Save
Now you can refresh the query!