The issue with this one was that MSAL requires to use different authentication for the sharepoint so I had to use graph api acces to get the files not the REST sharepoint and removing these permission.