Microsoft Exchange

Enables integration with a Microsoft Exchange server.

The component can also integrate with Exchange Online, but Microsoft will not allow any new systems to use EWS after September 30, 2022 so you should use the Microsoft Graph component when building new integrations against Exchange Online. Existing systems using the component will continue to work after this date.

Component modes: EWS

Component mode: EWS

Remember, Exchange's own id values (@ItemID) are both long (use at least varchar(300)) and case-sensitive.

Default credentials

By default the username and password from the encrypted credentials specified by the system setting ExchangeAccountCredentials are used to connect to the Exchange server.

Integrating with Exchange Online

When integrating with Exchange Online the component acts as an Azure Active Directory application. It does not require its own mailbox and instead uses impersonation to access the mailboxes of users and rooms.

You will need to register a new application for the component to use in the tenant that owns the mailboxes you should access.

https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-authenticate-an-ews-application-by-using-oauth#register-your-application

Once the application has been granted the full_access_as_app permission no specific configuration is needed when new users are added.

If you need to access shared mailboxes you will need to add the Mail.Read.Shared permission.

Configuration

Use https://outlook.office365.com as ServerUrl.

Use https://login.microsoftonline.com/{GUID of tenant} as Authority.

Use the application's client id as Username and its client secret as Password.

Integrating with an on-premises Exchange server

When integrating with an on-premises Exchange server (that is, a server running some version of Exchange Server) the component acts as a normal user. It requires its own mailbox and you must configure delegation for each other user's or room's mailbox that it shall access.

The component is capable of integrating with Exchange Server 2010, 2013, 2017 and 2019 as long as the Exchange Server has the latest service pack for its version installed.

SQL

SQL Call: Get actions (EWS) (mandatory)

SQL-statement to retrieve Exchange server requests (commands).

The component will poll the procedure for requests up to ten times, or until the procedure issues a RETURN without SELECT:ing any data.

You can output the tables containing actions (ReadEmail, DeleteItem, ...) in any order and do not need to follow the order they are documented.

May modify database: Yes

Parameters

@Action string
Possible value Description
null The component wants commands to execute.
@BatchId string
BatchId if a resultset containing BatchId was returned in get action call.
@Step int
Starting at 0, @Step tells you how many times the component has already made the Get actions call. You can use this variable when you have actions where order is important, for example by reading email in step 0, and then deleting the imported email in step 1.

Resultset: Batch (optional)

Must be the first table in the resultset and may only exist when @Step=0.
Table count: repeated zero or one time
Row count: exactly one row
Columns
BatchId mandatory string
BatchId that will be sent back to the component for all of the procedure calls. This is useful when it is helpful to make processing to all items in a batch.

Resultset: Connection details (optional)

You only need to use this table if you need to override some or all of the default system settings for the component. For example, if you need to use more than one set of credentials.
Table count: repeated zero or one time
Row count: zero or more rows
Columns
ConnectionId mandatory int
ID that actions use to refer to these connections.
AccountType optional string
Account type.
Possible value Description
app Connect as an application. Used when integrating with Exchange Online.
user Connect as a user. Used when integrating with an on-premises Exchange server.
Authority optional string
When connecting as an app, the authority the app exists under.
Credentials optional string
Credentials to use. Omit to use the setting ExchangeAccountCredentials.
Password optional string
Password to use. If possible, use the Credentials column instead of storing unencrypted passwords in the database. Omit to use the setting ExchangeAccountCredentials.
ServerUrl optional string
Server to connect to. Omit to use the ExchangeServerUrl setting.
Username optional string
Username to use. Omit to use the setting ExchangeAccountCredentials.

Resultset: Actions (EWS, base)

Table count:
Row count:
Columns
Id mandatory string
Id-value of an Exchange server request, returned in the parameter @id.
ConnectionId optional int
Use a set of custom connection details from the Connection details table. Omit to use the default connection details as specified by the component's system settings.
User mandatory string
Name of the mailbox to target. Username or primary email address.

Resultset: Actions (EWS, with target)

Table count:
Row count:
Columns
Id mandatory string
Id-value of an Exchange server request, returned in the parameter @id.
Folder optional string
Path to folder to retrieve or store data to, relative to the source folder (see the 'sourcefolder' column), with folder names separated by slashes (/). For example 'Felrapporter/KOLL'.

You may optionally terminate the path with a slash.

If "\" or "/" is part of the folder name they must be escaped with a backslash. E.g. a folder with the name "apa/bepa" should be specified as "apa\/bepa".
Default: Omit the column or return NULL to target the source folder itself.
SourceFolder optional string
Targets one of Exchange's special folders. Use the 'folder' column to target folders inside one of the special folders.
Default: The default folder depends on the action. I.e. Inbox for ReadEmail.
Possible value Description
Calendar The user's calendar.
Contacts The user's contacts folder.
Inbox The user's inbox.
MessageFolderRoot The user's mailbox. The folder containing the inbox, calendar, etc.
PublicFoldersRoot The root of the public folders on the Exchange server. In a Swedish outlook this folder is 'Gemensamma mappar/Alla gemensamma mappar'
SentItems The user's folder for sent email.
ConnectionId optional int
Use a set of custom connection details from the Connection details table. Omit to use the default connection details as specified by the component's system settings.
User mandatory string
Name of the mailbox to target. Username or primary email address.

Resultset: Read Email Action (EWS) (optional)

Reads email from a user's mailbox.

This resultset causes a ReadEmail result call to be made for each email found.
Table count: repeated zero or more times
Row count: zero or more rows
Columns
Action mandatory string
What action to perform.
Possible value Description
ReadEmail
Id mandatory string
Id-value of an Exchange server request, returned in the parameter @id.
Attachments optional string
How to deal with email attachments.
Possible value Description
Count Counts the attachments. (Default)
Download Downloads all attachments.

See the Attachment result call.
Enumerate Gets attachment properties like file name, but not the attachment itself.

See the Attachment result call.
Folder optional string
Path to folder to retrieve or store data to, relative to the source folder (see the 'sourcefolder' column), with folder names separated by slashes (/). For example 'Felrapporter/KOLL'.

You may optionally terminate the path with a slash.

If "\" or "/" is part of the folder name they must be escaped with a backslash. E.g. a folder with the name "apa/bepa" should be specified as "apa\/bepa".
Default: Omit the column or return NULL to target the source folder itself.
FromDate mandatory datetime
Email received from this date. Only the date-part of the datetime is used.
ToDate mandatory datetime
Email received to this date. Only the date-part of the datetime is used.
SourceFolder optional string
Targets one of Exchange's special folders. Use the 'folder' column to target folders inside one of the special folders.
Default: The default folder depends on the action. I.e. Inbox for ReadEmail.
Possible value Description
Calendar The user's calendar.
Contacts The user's contacts folder.
Inbox The user's inbox.
MessageFolderRoot The user's mailbox. The folder containing the inbox, calendar, etc.
PublicFoldersRoot The root of the public folders on the Exchange server. In a Swedish outlook this folder is 'Gemensamma mappar/Alla gemensamma mappar'
SentItems The user's folder for sent email.
ConnectionId optional int
Use a set of custom connection details from the Connection details table. Omit to use the default connection details as specified by the component's system settings.
User mandatory string
Name of the mailbox to target. Username or primary email address.

Resultset: Read Calendar Action (EWS) (optional)

Reads calendar appointments from a user's calendar.

You should specify both FromDate and ToDate, and have them cover a period no greater than one year.

This resultset causes a ReadCalendar result call to be made for each appointment found.
Table count: repeated zero or more times
Row count: zero or more rows
Columns
Action mandatory string
What action to perform.
Possible value Description
ReadCalendar
Id mandatory string
Id-value of an Exchange server request, returned in the parameter @id.
Folder optional string
Path to folder to retrieve or store data to, relative to the source folder (see the 'sourcefolder' column), with folder names separated by slashes (/). For example 'Felrapporter/KOLL'.

You may optionally terminate the path with a slash.

If "\" or "/" is part of the folder name they must be escaped with a backslash. E.g. a folder with the name "apa/bepa" should be specified as "apa\/bepa".
Default: Omit the column or return NULL to target the source folder itself.
FromDate mandatory datetime
Appointments from this date. Only the date-part of the datetime is used.
ToDate mandatory datetime
Appointments to this date. Only the date-part of the datetime is used.
SourceFolder optional string
Targets one of Exchange's special folders. Use the 'folder' column to target folders inside one of the special folders.
Default: The default folder depends on the action. I.e. Inbox for ReadEmail.
Possible value Description
Calendar The user's calendar.
Contacts The user's contacts folder.
Inbox The user's inbox.
MessageFolderRoot The user's mailbox. The folder containing the inbox, calendar, etc.
PublicFoldersRoot The root of the public folders on the Exchange server. In a Swedish outlook this folder is 'Gemensamma mappar/Alla gemensamma mappar'
SentItems The user's folder for sent email.
FetchBody mandatory bit
Used to fetch the item body of the calendar post. Default is 0.
ConnectionId optional int
Use a set of custom connection details from the Connection details table. Omit to use the default connection details as specified by the component's system settings.
User mandatory string
Name of the mailbox to target. Username or primary email address.

Resultset: Read Contact Action (EWS) (optional)

Reads a user's contacts.

This resultset causes a ReadContact result call to be made for each contact found.
Table count: repeated zero or more times
Row count: zero or more rows
Columns
Action mandatory string
What action to perform.
Possible value Description
ReadContact
Id mandatory string
Id-value of an Exchange server request, returned in the parameter @id.
Folder optional string
Path to folder to retrieve or store data to, relative to the source folder (see the 'sourcefolder' column), with folder names separated by slashes (/). For example 'Felrapporter/KOLL'.

You may optionally terminate the path with a slash.

If "\" or "/" is part of the folder name they must be escaped with a backslash. E.g. a folder with the name "apa/bepa" should be specified as "apa\/bepa".
Default: Omit the column or return NULL to target the source folder itself.
SourceFolder optional string
Targets one of Exchange's special folders. Use the 'folder' column to target folders inside one of the special folders.
Default: The default folder depends on the action. I.e. Inbox for ReadEmail.
Possible value Description
Calendar The user's calendar.
Contacts The user's contacts folder.
Inbox The user's inbox.
MessageFolderRoot The user's mailbox. The folder containing the inbox, calendar, etc.
PublicFoldersRoot The root of the public folders on the Exchange server. In a Swedish outlook this folder is 'Gemensamma mappar/Alla gemensamma mappar'
SentItems The user's folder for sent email.
ConnectionId optional int
Use a set of custom connection details from the Connection details table. Omit to use the default connection details as specified by the component's system settings.
User mandatory string
Name of the mailbox to target. Username or primary email address.

Resultset: List Folders Action (EWS) (optional)

Lists all folders in a folder. Not recursive.

This resultset causes a ListFolders result call to be made for each folder found.
Table count: repeated zero or more times
Row count: zero or more rows
Columns
Action mandatory string
What action to perform.
Possible value Description
ListFolders
Id mandatory string
Id-value of an Exchange server request, returned in the parameter @id.
User mandatory string
Name of the mailbox to target. Username or primary email address.
Folder optional string
Path to folder to retrieve or store data to, relative to the source folder (see the 'sourcefolder' column), with folder names separated by slashes (/). For example 'Felrapporter/KOLL'.

You may optionally terminate the path with a slash. The path may not start with a slash and may not contain two slashes next to each other.
Default: Omit the column or return NULL to target the source folder itself.
SourceFolder mandatory string
Targets one of Exchange's special folders. Use the 'folder' column to target folders inside one of the special folders.
Possible value Description
Calendar The user's calendar.
Contacts The user's contacts folder.
Inbox The user's inbox.
MessageFolderRoot The user's mailbox. The folder containing the inbox, calendar, etc.
PublicFoldersRoot The root of the public folders on the Exchange server. In a Swedish outlook this folder is 'Gemensamma mappar/Alla gemensamma mappar'
SentItems The user's folder for sent email.
ConnectionId optional int
Use a set of custom connection details from the Connection details table. Omit to use the default connection details as specified by the component's system settings.
User mandatory string
Name of the mailbox to target. Username or primary email address.

Resultset: Write Calendar Action (EWS) (optional)

Each row in this resultset corresponds to a calendar item to create or update. An Update confirmation call will be made for each item.

This resultset accepts columns corresponding to the parameters for the ReadCalendar Result call, (meetingstart, busystatus, etc.). Refer to that call for documentation.
Table count: repeated zero or more times
Row count: zero or more rows
Columns
Action mandatory string
Action to perform.
Possible value Description
WriteCalendar
BusyStatus mandatory string
The calendar items busy status.
Possible value Description
Busy
Free
Oof Out of office
Tentative
Id mandatory string
Id-value of an Exchange server request, returned in the parameter @id.
MeetingEnd mandatory datetime
End time of the meeting start.
MeetingStart mandatory datetime
Start time of the calendar item.
Subject mandatory string
The subject of the calendar item.
Folder optional string
Path to folder to retrieve or store data to, relative to the source folder (see the 'sourcefolder' column), with folder names separated by slashes (/). For example 'Felrapporter/KOLL'.

You may optionally terminate the path with a slash.

If "\" or "/" is part of the folder name they must be escaped with a backslash. E.g. a folder with the name "apa/bepa" should be specified as "apa\/bepa".
Default: Omit the column or return NULL to target the source folder itself.
SourceFolder optional string
Targets one of Exchange's special folders. Use the 'folder' column to target folders inside one of the special folders.
Default: The default folder depends on the action. I.e. Inbox for ReadEmail.
Possible value Description
Calendar The user's calendar.
Contacts The user's contacts folder.
Inbox The user's inbox.
MessageFolderRoot The user's mailbox. The folder containing the inbox, calendar, etc.
PublicFoldersRoot The root of the public folders on the Exchange server. In a Swedish outlook this folder is 'Gemensamma mappar/Alla gemensamma mappar'
SentItems The user's folder for sent email.
AttendeeStatus optional string
Attendee status.
Possible value Description
Accepted
Declined
NoResponse
Organizer
Tentative
Body optional string
The body of the calendar item.
ConnectionId optional int
Use a set of custom connection details from the Connection details table. Omit to use the default connection details as specified by the component's system settings.
HasReminder optional bit
If the calendar item will have a reminder.
Default: The exchange user's default behavior.
ItemId optional string
Item ID of calendar appointment to update. Omit to create a new appointment.
Location optional string
Location of the meeting.
Priority optional string
Priority of the calendar item.
Default: Normal is the default value.
Possible value Description
High
Low
Normal
ResponseRequested optional bit
Whether a response is requested from the attendees when invitations are sent for the meeting.
This only has effect when editing existing meetings with attendees as the component can not add attendees.
Sensitivity optional string
The sensitivity of the calendar item. This property corresponds to the private setting in Outlook.
Default: Normal is the default value.
Possible value Description
Confidential (Seldom used)
Normal
Personal (Seldom used)
Private
User mandatory string
Name of the mailbox to target. Username or primary email address.

Resultset: Write Contact Action (EWS) (optional)

Each row in this resultset corresponds to a contact to create or update. An Update confirmation call will be made for each item.

This resultset accepts columns corresponding to the parameters for the ReadContact Result call, (workphone, firstname, etc). Refer to that call for documentation.
Table count: repeated zero or more times
Row count: zero or more rows
Columns
Action mandatory string
What action to perform.
Possible value Description
WriteContact
Id mandatory string
Id-value of an Exchange server request, returned in the parameter @id.
Folder optional string
Path to folder to retrieve or store data to, relative to the source folder (see the 'sourcefolder' column), with folder names separated by slashes (/). For example 'Felrapporter/KOLL'.

You may optionally terminate the path with a slash.

If "\" or "/" is part of the folder name they must be escaped with a backslash. E.g. a folder with the name "apa/bepa" should be specified as "apa\/bepa".
Default: Omit the column or return NULL to target the source folder itself.
SourceFolder optional string
Targets one of Exchange's special folders. Use the 'folder' column to target folders inside one of the special folders.
Default: The default folder depends on the action. I.e. Inbox for ReadEmail.
Possible value Description
Calendar The user's calendar.
Contacts The user's contacts folder.
Inbox The user's inbox.
MessageFolderRoot The user's mailbox. The folder containing the inbox, calendar, etc.
PublicFoldersRoot The root of the public folders on the Exchange server. In a Swedish outlook this folder is 'Gemensamma mappar/Alla gemensamma mappar'
SentItems The user's folder for sent email.
Birthday optional datetime
Birthday for the contact.
CellPhone optional string
Cell phone for the contact.
Company optional string
Company for the contact.
ConnectionId optional int
Use a set of custom connection details from the Connection details table. Omit to use the default connection details as specified by the component's system settings.
Department optional string
Department for the contact.
Email1 optional string
Primary email address for the contact.
Email2 optional string
Secondary email address for the contact.
Email3 optional string
Tertiary email address for the contact person.
FileAs optional string
How the contact should be displayed.
Default: First name + ' ' + last name
FirstName optional string
First name for the contact.
HomeCity optional string
Home city for the contact.
HomeCountry optional string
Home country for the contact.
HomePhone optional string
Home phone for the contact.
HomeState optional string
Home state for the contact.
HomeStreet optional string
Home street for the contact.
HomeZipCode optional string
Home zip code for the contact person.
ItemId optional string
Exchange ID of contact to update. Omit to create a new contact.
LastName optional string
Last name for the contact.
MiddleName optional string
Middle name for the contact.
User mandatory string
Name of the mailbox to target. Username or primary email address.
WorkCity optional string
Work city for the contact.
WorkCountry optional string
Work country for the contact.
WorkFax optional string
Work fax for the contact.
WorkPhone optional string
Work phone for the contact.
WorkState optional string
Work state for the contact.
WorkStreet optional string
Work street for the contact.
WorkTitle optional string
The work title for the contact.
WorkZipcode optional string
Work zip code for the contact.

Resultset: Delete Item Action (EWS) (optional)

Each row in this resultset describes an item (email, contact, or calendar item) to be deleted. Each deletion will cause a Delete confirmation call to be made.
Table count: repeated zero or more times
Row count: zero or more rows
Columns
Action mandatory string
What action to perform.
Possible value Description
DeleteItem
Id mandatory string
Id-value of an Exchange server request, returned in the parameter @id.
ItemID mandatory string
Exchange ID of item to delete.
ConnectionId optional int
Use a set of custom connection details from the Connection details table. Omit to use the default connection details as specified by the component's system settings.
User mandatory string
Name of the mailbox to target. Username or primary email address.

SQL Call: ReadEmail result (EWS)

SQL-statement that the component executes whenever an email has been downloaded from the server. The call is made once for every email downloaded, but if no emails are found then the call is still made once, with @itemid set to null.

May modify database: Yes

Parameters

@Action string
Possible value Description
reademail The component is returing the result of a reademail action.
@AttachmentCount int
The number of attachments included in the email.
@BatchId string
BatchId if a resultset containing BatchId was returned in get action call.
@Bcc string
Bcc header for this email. Only relevant for emails sent from this account.
@Body string
Message body of the email.
@Cc string
Cc header for this email.
@ConversationId string
Identifies a specific conversation.
@ErrorCode int
Possible value Description
0 No Error
1 An error occured. See ErrorMessage.
@ErrorMessage string
Information that might be useful in figuring out what went wrong.
@From string
From header for this email.
@Id string
The value that you specified in the command.
@IsLastItem bit
If this is the last email downloaded by the request.
@ItemId string
Id value of the downloaded email. This Id is not globally unique or even locally unique, but merely currently unique, i.e. after an item is deleted the Exchange server may decide to reuse the Id to reference a new item. Thus itemid needs to be combined with receiveddatetime to ensure a key that is locally unique, i.e. unique for the current Exchange server. Such a derived locally unique key may then be used to check if you already have the email in your database.

Also note that itemid is case sensitive, thus you need to use a case sensitive collation when checking for matches in your database.
@ReceivedDatetime datetime
The time when the email was received.
@SentDatetime datetime
The time when the email was sent.
@Subject string
Subject header for this email.
@To string
To header for this email.

Resultset: Email ID (optional)

Table count: repeated zero or one time
Row count: exactly one row
Columns
id optional string
This value is sent as the @id parameter to the attachment result call. If the column is not present the same id value is used as for the reademail action.

SQL Call: Attachment result (EWS)

SQL-statement that the component executes whenever an attachment or attachment meta-data has been downloaded from the server.

May modify database: Yes

Parameters

@Action string
Possible value Description
readattachment The component is returning an attachment fetched by a command.
@Attachment binary
The attachment data.
@AttachmentContentLength int
The length of the attachment (in bytes).
@AttachmentContentType string
The content type of the attachment.
@AttachmentFilename string
Filename of this attachment.
@BatchId string
BatchId if a resultset containing BatchId was returned in action Init.
@ErrorCode int
Possible value Description
0 No error.
1 An error occured. See ErrorMessage.
@ErrorMessage string
Information that might be useful in figuring out what went wrong.
@Id string
The value that you specified in the command.
@IsLastItem bit
If this is the last attachment for this email.
@ItemId string
Id-value of the email owning the attachment.

SQL Call: ReadCalendar result (EWS)

SQL-statement that the component executes whenever a calendar item has been downloaded from the server. The call is made once for every calendar item downloaded, but if no items are found then the call is still made once, with @itemid set to null.

May modify database: No

Parameters

@Action string
Possible value Description
readcalendar The component is returing the result of a readcalendar action.
@AttendeeStatus string
Indicates if the user plans to attend the meeting. Note: Exchange Web Services treats this as a read only property and thus it can not be set by using a writecalendar-action.
Possible value Description
ACCEPTED
DECLINED
NORESPONSE
ORGANIZER
TENTATIVE
UNKNOWN
@BatchId string
BatchId if a resultset containing BatchId was returned in get action call.
@Body string
Description of the meeting.
@BusyStatus string
Indicates how the time-slot should be marked in the calendar.
Possible value Description
BUSY
FREE
NODATA when no value is set
OOF Out Of Office
TENTATIVE
@ErrorCode int
Possible value Description
0 No error.
1 An error occured. See ErrorMessage.
@ErrorMessage string
Information that might be useful in figuring out what went wrong.
@Id string
The value that you specified in the command.
@IsLastItem bit
If this is the last calendar item downloaded by the request.
@ItemId string
Id value of the downloaded calendar appointment. This Id is not globally unique or even locally unique, but merely currently unique, i.e. after an item is deleted the Exchange server may decide to reuse the Id to reference a new item. This is thus something that you might have to take into consideration when checking if you already have the appointment in your database.

Also note that itemid is case sensitive, thus you need to use a case sensitive collation when checking for matches in your database.
@Location string
The location of the meeting.
@MeetingEnd datetime
The time the meeting is planned to end.
@MeetingStart datetime
The time the meeting is planned to start.
@MeetingStatus string
Indicates the status of the meeting. Note: Exchange Web Services treats this as a read only property and thus it can not be set by using a writecalendar-action.
Possible value Description
CANCELLED
CONFIRMED
NONE
TENTATIVE
@Organizer string
The organizer of the meeting. Note: Exchange Web Services treats this as a read only property and thus it can not be set by using a writecalendar-action.
@Priority int
Indicates the calendar items importance.
Possible value Description
0 Normal
1 High
-1 Low
@Reminder int
Number of seconds before the start of the meeting to remind the user.
Possible value Description
NULL No reminder
@ResponseRequested bit
Indicates that the user should confirm the meeting (currently not supported by Softadmin®).
@Sensitivity string
The sensitivity of the calendar item. This property corresponds to the private setting in Outlook.
Possible value Description
Confidential (Seldom used)
Normal
Personal (Seldom used)
Private
@Subject string
The subject of the meeting.

SQL Call: ReadContact result (EWS)

SQL-statement that the component executes whenever a contact has been downloaded from the server. The call is made once for every contact downloaded, but if no contacts are found then the call is still made once, with @itemid set to null.

May modify database: Yes

Parameters

@Action string
Possible value Description
readcontact The component is returing the result of a readcontact action.
@BatchId string
BatchId if a resultset containing BatchId was returned in get action call.
@Birthday datetime
The contact's birthday.
@CellPhone string
The contact's cell phone number.
@ChangeKey string
@Company string
The contact's company or organization.
@Department string
The contact's department.
@Email1 string
The contact's primary email address.
@Email2 string
The contact's secondary email address.
@Email3 string
The contact's tertiary email address.
@ErrorCode int
Possible value Description
0 No error.
1 An error occured. See ErrorMessage.
@ErrorMessage string
Information that might be useful in figuring out what went wrong.
@FileAs string
The contacts "File As"-property (i.e. the heading of the contact). When writing a contact, this field will default to "<firstname> <lastname>" if no explicit value is given.
@FirstName string
The contact's first name.
@HomeCity string
The contact's home city.
@HomeCountry string
The contact's home country.
@HomePhone string
The contact's home phone number.
@HomeState string
The contact's home state or region.
@HomeStreet string
The contact's home street address.
@Id string
The value that you specified in the command.
@IsLastItem bit
If this is the last contact downloaded by the request.
@ItemId string
Id value of the downloaded contact. This Id is not globally unique or even locally unique, but merely currently unique, i.e. after an item is deleted the Exchange server may decide to reuse the Id to reference a new item. This is thus something that you might have to take into consideration when checking if you already have the contact in your database.

Also note that itemid is case sensitive, thus you need to use a case sensitive collation when checking for matches in your database.
@LastName string
The contact's last name.
@MiddleName string
The contact's middle name.
@WorkCity string
The contact's work city.
@WorkCountry string
The contact's work country.
@WorkFax string
The contact's work fax number.
@WorkPhone string
The contact's work phone number.
@WorkState string
The contact's work state or region.
@WorkStreet string
The contact's work street address.
@WorkTitle string
The contact's work title.
@WorkZipCode string
The contact's work zip code.

SQL Call: ListFolders result (EWS)

SQL-statement that the component executes after searching for folders. The call is made once for every folder found, but if no folders are found then the call is still made once, with @itemid set to null.

May modify database: Yes

Parameters

@Action string
Possible value Description
listfolders The component is returning the result of a listfolders action.
@BatchId string
BatchId if a resultset containing BatchId was returned in get action call.
@ChildFolderCount int
How many subfolders the folder has.
@ErrorCode int
Possible value Description
0 No error.
1 An error occured. See ErrorMessage.
@ErrorMessage string
Information that might be useful in figuring out what went wrong.
@FolderName string
The name of the folder.
@FolderType string
What kind of folder it is. Not all kinds of folders can contain all kinds of objects.
Possible value Description
CalendarFolder A calendar. Can only contain calendar events and other folders.
ContactsFolder A contact list. Can only contain contacts and other folders.
Folder A normal folder.
Unknown A search folder, a task list, or some other kind of special folder. You should not read to or write from this kind of folder.
@Id string
The value that you specified in the command.
@IsLastItem bit
If this is the last folder found by the request.
@ItemId string
The Exchange server's internal id for the folder.

Note that itemid is case sensitive, thus you need to use a case sensitive collation when checking for matches in your database.

SQL Call: Delete confirmation (EWS)

May modify database: Yes

Parameters

@action string
Possible value Description
deleteitem The component is returing the result of a deleteitem action.
@BatchId string
BatchId if a resultset containing BatchId was returned in get action call.
@id string
The value that you specified in the command.
@itemid string
The Id of the item.

SQL Call: WriteContact result (EWS) (mandatory)

SQL-statement that the component executes whenever a contact has been updated or stored on the server.

May modify database: Yes

Parameters

@Action string
Possible value Description
WriteContact The component is returing the result of a WriteContact action.
@BatchId string
BatchId if a resultset containing BatchId was returned in get action call.
@ErrorCode int
Possible value Description
0 No error.
1 An error occured. See ErrorMessage.
@ErrorMessage string
Information that might be useful in figuring out what went wrong.
@Id string
The value that you specified in the command.
@ItemId string
The Id of the item. This value is only set when storing a new item to the server.

SQL Call: WriteCalendar result (EWS) (mandatory)

SQL-statement that the component executes whenever a calendar item has been updated or stored on the server.

May modify database: Yes

Parameters

@Action string
Possible value Description
WriteCalendar The component is returing the result of a WriteCalendar action.
@BatchId string
BatchId if a resultset containing BatchId was returned in get action call.
@Id string
The value that you specified in the command.
@ItemId string
The Id of the item. This value is only set when storing a new item to the server

SQL Call: Finished (mandatory)

SQL-statement that the component executes when all requests are finished.

May modify database: Yes

Parameters

@action string
Possible value Description
finished The component is done
@BatchId string
BatchId if a resultset containing BatchId was returned in action Init.

SQL Call: Validate parameters

Allows you to validate the SQL parameters before any other SQL is run in the component. This call is only made if the SQL is a stored procedure and Validate parameters is checked.

May modify database: No

Parameters

@Force bit
Set to 1 if the last call to validate parameters used admin_force and the user clicked OK in the OK/Cancel dialog.
@ValidateParams bit
Set to 1 when this call is made.

Resultset: Messages (optional)

Table count: repeated zero or one time
Row count: zero or one row
Columns
ADMIN_Force optional string
Message asking the end user to confirm their parameters.
ADMIN_Message optional string
Message explaining why the parameters are rejected.

Custom access control and logging

SQL Call: Custom access control and logging

Use this call to restrict which entries a user is allowed to view and edit, and to log which entries a user views.

Access to a menu item is normally controlled through functions and roles alone but some entities need more fine grained control. For example, a user may have access to the View Member menu item for normal members but not for members with a protected identity.

The menu items a user visits are always logged (in ADMINLogMenuItem) but for sensitive data you may need to log exactly what entries are viewed. Do the logging in this call as the common ways of viewing data (grid and InfoSQL) are not allowed to modify the database.

If you bind a scalar function instead of a stored procedure to this call then its name must end with '_GrantAccess'.

May modify database: Yes

Resultset: Access permissions

Return whether the user is allowed to visit the menu item with the current parameters.
Table count: repeated exactly once
Row count: exactly one row
Columns
GrantAccess mandatory bit
1 if the user is allowed to view the menu item, 0 if the user should not be allowed to view the menu item.

If 0 then an error will be logged as the user should not have been able to reach the menu item with the given parameters in the first place.