Hi @Asad Reyaz ,
Welcome!
Are you using Outlook desktop client? Or just trying to add your O365 email account to your Gmail account?
I tried some search about your errors and seems that similar issues usually happen when adding Outlook account to Gmail. And the errors are more related to the mail server. Please kindly understand that the Outlook tag here we mainly focus on general issues about Outlook desktop client and know few about O365 account itself.
Here is some related information I found, please check if these could be helpful to your issue:
I'm not able to get office365-emails into my Gmail-account.
Pulling Office 365 Accounts into Gmail
attempting to add my outlook account to gmail using the "add another email address"
(Note: Since these web sites are not hosted by Microsoft, the links may change without notice. Microsoft does not guarantee the accuracy of this information.)
By the way, to better help solve your issue, it is suggested for you to add more O365 account-related tags to your thread so that other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thanks for your understanding and hope your question will be resolved soon.
If an Answer is helpful, please click "Accept Answer" and upvote it.
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.