Hello @Ibrahim Shawky !
Thanks for the update it is clear now
Basic Authenication got deprecated since October 2022
As of this date, Basic Authentication is no longer accepted; you have to use OAuth 2.0 (modern authentication) for your connections. This is likely the cause of the 401 Unauthorized error message.
I think i know where to point you
The thread below is a similar issue
To start with something ----------->
You have to :
Register your Application in Azure Active Directory: Go to Azure Portal -> Azure Active Directory -> App registrations -> New registration. Note down the Application (client) ID, you will need it in your code.
-
Register your application with Azure Active Directory.
-
Add code to get an authentication token to get an authentication token from a token server.
-
Add an authentication token to EWS requests that you send.
Have a look also here :
I hope this helps!
Kindly mark the answer as Accepted and Upvote in case it helped!
Regards