ex_login_O365_OAuth
Login to Office 365 with OAuth using EWS
Member of namespace
EwsmailSyntax
bool ex_login_O365_OAuth (string clientId, string tenantId, string username, string password)Parameters
- clientId
- Type: string
- tenantId
- Type: string
- username
- Type: string
- password
- Type: string
All parameters support smart parameters.
Parameters (clientId, tenantId, username, password) can be encrypted by storing it in the Advanced section of the Custom tab in the Application Manager.
To retrieve parameters that is stored in the Advanced section, use a smart parameter for the action's parameters similar to @APPVAR(values/adv/password) where password is the name entered for the value in the Application Manager.
Returns
True if the login succeeds. Otherwise, False.Level
Batch level, open event.Details
*** This Action Is Deprecated ***
This action has been deprecated and is scheduled to be removed in a future release. It is recommended that you no longer use this action.
To use OAuth authentication service provided by Azure Active Directory to enable EWS to access Exchange Online in Office 365, you will need to:
- Register application with Azure Active Directory.
- For Authentication, under "Default client type", set "Yes" to "Treat application as a public client."
- For API permissions, add "Exchange - EWS.AccessAsUser.All" and grant consent.
- Example:
-
ex_login_O365_OAuth("00000000-0000-0000-0000-000000000000", "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "user@organization.com", "@APPVAR(values/adv/password)") ex_scan() ex_logout()