@Chaaru, Thanks for posting in Q&A.
From your description, I know you cannot access to Office 365 Files Despite Device Compliance on Ubuntu.
To clarify this issue, please check the following.
1.Check if the Condition Access policy in Intune that may block accessing Office 365 files.
2.Please share the screenshot of compliance policy settings.
3.Please try to unenroll your Linux device from Intune to check if you can access Office 365 files.
If there is any update, feel free to let me know.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.