From 01.10.2022 the basic authentication will be deprecated by Microsoft for many services. This package provides a simple way to migrate from basic authentication to OAuth by creating a proxy service.
https://github.com/mmalcek/basicToOauth/releases
Direct Windows download link
Note: Currently only Windows and Linux (64bit) prebuild binaries are available. I can build binaries for other platforms on request.
host: "127.0.0.1" # Host of the proxy service
port: "8085" # Port of the proxy service
client_id: "yourAzureClientID" # Azure App registration client ID
tenant_id: "yourAzureTenantID" # Azure tenant ID
proxy_url: "https://outlook.office365.com" # URL of the target service
authority_url: "https://login.microsoftonline.com/" # URL of the authority service
scopes:
- "https://outlook.office365.com/EWS.AccessAsUser.All" # Scopes for the target service
host 127.0.0.1 is HIGHLY RECOMMENDED because comunication between proxy service and your application is not encrypted. In other words, basicToOauth app should be on the same machine as your application.
Once the application is running, you can use it in your application so instead "https://outlook.office365.com/..." just use "http://127.0.0.1:8085/..."
btw: If you like this app you can buy me a coffe ;)
MS topic - Authenticate an EWS application by using OAuth
Short version:
Azure portal -> Azure Active Directory -> App registrations -> New registration
Azure portal -> Azure Active Directory -> App registrations -> MyApp -> Authentication
Azure portal -> Azure Active Directory -> App registrations -> MyApp -> Manifest
{
"resourceAppId": "00000002-0000-0ff1-ce00-000000000000",
"resourceAccess": [
{
"id": "3b5f3d61-589b-4a3c-a359-5dd4b5ee5bd5",
"type": "Scope"
}
]
},
So it should looks like:
```JSON
"requiredResourceAccess": [
{
"resourceAppId": "00000002-0000-0ff1-ce00-000000000000",
"resourceAccess": [
{
"id": "3b5f3d61-589b-4a3c-a359-5dd4b5ee5bd5",
"type": "Scope"
}
]
},
{
"resourceAppId": "00000003-0000-0000-c000-000000000000",
"resourceAccess": [
{
"id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
"type": "Scope"
}
]
}
],
Azure portal -> Azure Active Directory -> App registrations -> MyApp -> Api permissions Click on "Grant admin consent for "yourTenantName"
Azure portal -> Azure Active Directory -> App registrations -> MyApp -> Overview