Step by step configuration of APP- wsgetmail for modern authentication for O365 for creating RT ticket via email

On September 1, 2022, Microsoft updated their published schedule for deactivating Basic Authentication on cloud hosted email. Starting October 1, they started randomly disabling authentication for Exchange Online. If you are running a service that uses Basic Auth to load email for RT, this would be useful for you as starting January 2023 the basic Auth will disabled for those that requested extension.
I was following the documentation on github to implement the modern auth to get rid of O365 basic auth and fetchmailrc in RT4 server, but the process was not clear enough and I have decided to write a step by step process that I have followed for this implementation to help the community.
As a new user I am not able to add more than two link and that is why I have created a medium article for the step by step implementation guide and you can find it below: