Forum Discussion
Error Syncing Notebooks from Microsoft Fabric UI to VS Code
Hi Anonymous !
Thanks for taking the time to pick this one up.
I will try to answer your questions, one by one, below:
1 - So you mean these two account both test on the same device? Did these accounts host on the same region with corresponding permissions?
I don't know if I fully understand what you mean with '(...) these two account both test on the same device (...)'.
What happens here is that these two (distinct) account are from two (distinct and completely unrelated) tenants -they are independent from one another, since they belong to unrelated tenants.
Furthermore let's not forget, and I think this is important, that my work colleague, who has only a single MS Fabric account also had the same 401 error after syncing a notebook, from the same ms fabric workspace, with her local machine/vs code.
I hope this part is very clear and, please let me know, if I misunderstood you.
2 - Have you tried to use different work folders to handle these accounts to prevent the credentials and sessions, local cache conflict issues?
Also not sure if I have done this or if it would be needed, since in the documentation I haven't found anything that explicitly would point me into that direction.
Actually, in the documentation, it simply states that '(...) The local working directory of the extension serves as the local root folder for all downloaded notebooks, even notebooks from different workspaces. (...)'
In any case, I have delved a bit into the setting JSON and changed the working folder in there but don't know if this is the correct way to do it and/or if this is what you meant.
And by the way, allow me an extra question:
Where is it stated that one needs to adjust the working folder when syncing notebooks from distinct workspaces and/or tenants ?
Because that message does not popup when one press the sync vs code button in MS Fabric.
Please, let me know what other details are important here. I'm glad to provide them as long as you don't require private information of course. 😁😀
Thank you.
HI SergioTorrinha,
In fact, the above thoughts are based on the error code instead of official document.
AFAIK, the HTTP 401 Unauthorized client error status response code indicates that the request has not been applied because it lacks valid authentication credentials for the target resource.
Since this error is related to the credentials and you also mentioned is switch between two accounts. So I will ask you to confirm the credential reasons during these operations at first (e.g. oauth token, session and local file cache) and tried to host them to different work folders to prevent the confit issue.
When you directly switch account on the device with cache file and active sessions, they may confit the sign in operations to the new account. (it used the cache data to quickly sign-in instead of use new credentials that you provide at the second time and obviously they will cause the authorization credential issues)
Regards,
Xiaoxin Sheng
- SergioTorrinha1 year ago
Resolver II
Hi Anonymous !
Sorry for late response, I've been out a couple of days to enjoy some Chrismas time with family. 🙂Anyway, thanks for the input, from which I have tried your suggestion to clear local cache ( because I really don't know how to perform that in VS Code, I followed suggestions here, so please let me know if there is a better way to do it ) and I also switched the working folder ctlr + shift + P > Synapse: Set Local Work Folder.
After these operations, unfortunantly, I still have the 401 error.
What I find weird is that, eventhough, I am logged in with the correct user and no workspace is selected, as soon as I click the select workspace button the error is triggered...
Any thgouhts on what to do next?
Thank you.
- SergioTorrinha1 year ago
Resolver II
Hi Anonymous !
I don't know if you had the oportunity to read my notes below, but I just would like to add something I have found in the meanwhile and that I think it might be related to this syncing issue:
it turns out that I am also not able to log in to PBI desktop with the same account that I have issues in vscode - more specifically, when I try to log in PBI desktop I am redirected to a brower webpage where its says 'Your organisation doesn't currently allow its users to purchase Microsoft Fabric free. Contact your IT admin for more information.'.
What does this mean exactly? Below is a print of the messaage I get:
So, I wonder, if it's possible, that some admin setting is turned or or off that might trigger this behaviour? To note that I am not the adim of the tenant so I cannot test things in that regard, hence I would apretiate your thoughts on it.
Looking forward to your input.
Thank you.- Anonymous1 year agoNot applicable
Hi SergioTorrinha,
I'd like to suggest you take a look at the following document about block self-service usage if it suitable to your scenarios:
About self-service sign-ups and purchases - Power BI | Microsoft Learn
BTW, you can also check if they enabled the device protect about azure account usages:
Regards,
Xiaoxin Sheng
- SergioTorrinha1 year ago
Resolver II
Hi Anonymous,
Thanks for the input!
I will definitly check this interanally.