I’ve tried to configure Gitlab SMTP email configuration using office 365. but I always ended up following error Net::SMTPAuthenticationError (535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator. even though i’ve right credential. If anyone knows the solution kindly replay in this thread, it would be really appreciated!.
I am actively trying to get this to work in combination with Microsoft 365 E5. The first error was caused by SMTP AUTH being turned off, which has to be active to use the SMTP relay. After turning it on, I have been stuck on the exact same error message as you. I have tried multiple different approaches at this point, such as setting it up as an enterprise application and attaching the SMTP.Send policy to it.
At this point I believe has something to do with the conditional access in Microsoft Entra ID, which is primarily motivated by the error it prints.
It seems like there is an initial connection, but the GitLab server doesn’t meet the access criteria set by Conditional Access. I haven’t had a change to mess around with the policies yet.
Searching the web hasn’t resulted in a resolution yet, so I’ll experimenting and hopefully I am eventually able to share the steps to get it to work.
I have managed to set gitlab with office365 using Microsoft Graph.
This video was helpful.
Wrote that program to make sure everything is working before setting gitlab