Exchange Adapter Actions
RapidIdentity Connect Exchange Administration Web Service Agent
The Exchange adapter depends on the Exchange Agent. Access the Exchange/Office 365 Agent Guides to download and install the correct agent.
Add a member to an Exchange Distribution Group.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
groupIdentity* | text, expression, variable | the identity of the DistributionGroup |
memberIdentity* | text, expression, variable | the identity of the object to add to the DistributionGroup |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
addExchangeDistributionGroupMember(sessionExch,"idautotestgroup", "idautotestuser")
Create an Exchange MoveRequest record. (Exchange 2010 or higher)
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
record* | expression, variable | the record to save |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
moveRequest = createRecord() setRecordFieldValue(moveRequest, "Identity", "testuser") setRecordFieldValue(moveRequest, "TargetDatabase", "db2") queuedMoveRequest = createExchangeMoveRequest(conn, moveRequest)
Delete an Exchange DistributionGroup record by Id.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
identity* | text, expression, variable | the identity of the Exchange DistributionGroup to delete |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
deleteExchangeDistributionGroup(sessionExch,"idautotestgroup")
Delete a member from an Exchange DistributionGroup.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
groupIdentity* | text, expression, variable | the identity of the DistributionGroup |
memberIdentity* | text, expression, variable | the identity of the object to delete from the DistributionGroup |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
deleteExchangeDistributionGroupMember(sessionExch,"idautotestgroup", "idautotestuser")
Delete an Exchange Mailbox record by Id.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
identity* | text, expression, variable | the identity of the Exchange Mailbox to delete |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
deleteExchangeMailbox(sessionExch,"idautotestuser")
Delete an Exchange MailContact record by Id.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
identity* | text, expression, variable | the identity of the Exchange MailContact to delete |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
deleteExchangeMailContact(sessionExch,"testcontact")
Delete an Exchange MailUser record by Id.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
identity* | text, expression, variable | the identity of the Exchange MailUser to delete |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
deleteExchangeMailUser(sessionExch,"idautotestmailuser")
Delete an Exchange MoveRequest record by Id. (Exchange 2010 or higher)
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
identity* | text, expression, variable | the identity of the Exchange MoveRequest to delete |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
# cleanup completed and failed move requests so those mailboxes can be moved again # first - get the move requests that have completed filter = createRecord() setRecordFieldValue(filter, "Status", "Completed") completedRequests = getExchangeMoveRequests(sessionExch, filter) forEach(completedRequest, completedRequests) { deleteExchangeMoveRequest(conn, completedRequest.identity) }
Disable an Exchange DistributionGroup record by Id.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
identity* | text, expression, variable | the identity of the Exchange DistributionGroup to disable |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
disableExchangeDistributionGroup(sessionExch,"idautotestgroup")
Disable an Exchange Mailbox record by Id.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
identity* | text, expression, variable | the identity of the Exchange Mailbox to disable |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
disableExchangeMailbox(sessionExch,"idautotestuser")
Disable an Exchange MailContact record by Id.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
identity* | text, expression, variable | the identity of the Exchange MailContact to disable |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
disableExchangeMailContact(sessionExch,"mailcontact")
Disable an Exchange MailUser record by Id.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
identity* | text, expression, variable | the identity of the Exchange MailUser to disable |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
disableExchangeMailUser(sessionExch,"idauttestmailuser")
Get an Exchange DistributionGroup record by Id.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
identity* | text, expression, variable | the identity of the Exchange DistributionGroup to get |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
getExchangeDistributionGroup(sessionExch, "idautotestgroup")
Get Exchange DistributionGroup records.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
filter | text, expression, variable | an OPath filter or an example Record |
maxResults | expression, variable | maximum number of Records to return (default: 1000) |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
getExchangeDistributionGroups(sessionExch,exchFilter)
Get an Exchange Mailbox record by Identity.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
identity* | text, expression, variable | the identity of the Exchange Mailbox to get |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
getExchangeMailbox(sessionExch,"idautotestuser")
Get Exchange Mailbox records.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
filter | text, expression, variable | an OPath filter or an example Record |
maxResults | expression, variable | maximum number of Records to return (default: 1000) |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
getExchangeMailboxes(sessionExch,exchFilter)
Get an Exchange MailContact record by Id.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
identity* | text, expression, variable | the identity of the Exchange MailContact to get |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
getExchangeMailContact(sessionExch, "idautotestmailuser")
Get Exchange MailContact records.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
filter | text, expression, variable | an OPath filter or an example Record |
maxResults | expression, variable | maximum number of Records to return (default: 1000) |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
getExchangeMailContacts(sessionExch)
Get an Exchange MailUser record by Id.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
identity* | text, expression, variable | the identity of the Exchange MailUser to get |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
getExchangeMailUser(sessionExch,"idautotestmailuser")
Get Exchange MailUser records.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
filter | text, expression, variable | an OPath filter or an example Record |
maxResults | expression, variable | maximum number of Records to return (default: 1000) |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
getExchangeMailUsers(sessionExch)
Get an Exchange MoveRequest record by Identity.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
identity* | text, expression, variable | the identity of the Exchange MoveRequest to get |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
getExchangeMoveRequest(sessionExch, "testuser")
Get Exchange MoveRequest records. (Exchange 2010 or higher)
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
filter | text, expression, variable | an example Record |
maxResults | expression, variable | maximum number of Records to return (default: 1000) |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
See deleteExchangeMoveRequest
Open a connection to Exchange.
Property | Value | Description |
---|---|---|
exchangeServer* | text, expression, variable | the DNS name or IP address of the Exchange server) |
dc | text, expression, variable | the domain qualified name of the Active Directory DC to use (default: automatic) |
exchangeAgentURL* | text, expression, variable | the URL of the Exchange Administrative Web Service agent (e.g. https://hostname:port/idautoExchangeAdminWS) |
username* | text, expression, variable | username for authentication to Exchange |
password* | password, string, expression, variable | password for authentication to Exchange |
options | expression, variable | A record or JavaScript object with a field for each additional option. Currently defined fields are connectTimeout and socketTime which require a numeric value from 1 to 2147483647 (0x7FFFFFFF) that represents the number of milliseconds for the timeout, and 0 representing no timeout. |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
Global.ExchURL = "https://10.10.10.10/idautoExchangeAdminWS" Global.ExchUser = "exchangeadmin@idauto.net" Global.ExchPwd = Password Global.ExchServer = "10.10.10.10" sessionExch = openExchangeConnection(Global.ExchServer,Global.ExchURL, Global.ExchUser,Password>)
Create/Update an Exchange DistributionGroup record.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
record* | expression, variable | the record to save |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
groupRecord = createRecord() setRecordFieldValue(groupRecord, "Name","idautotestgroup") saveExchangeDistributionGroup(sessionExch,groupRecord)
Create/Update an Exchange Mailbox record.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
record* | expression, variable | the record to save |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
userRecord = createRecord() setRecordFieldValue(userRecord, "Name","idautotestuser") setRecordFieldValue(userRecord, "Password",<Password>) setRecordFieldValue(userRecord, "userPrincipalName", "idautotestuser@test1.local") setRecordFieldValue(userRecord, "LastName","user1") setRecordFieldValue(userRecord, "FirstName","Bob") saveExchangeMailbox(sessionExch,userRecord)
Create/Update an Exchange MailContact record.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
record* | expression, variable | the record to save |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
contactRecord = createRecord() setRecordFieldValue(contactRecord, "Name","testcontact") setRecordFieldValue(contactRecord, "EmailAddresses", "testcontact@somewhere.org") saveExchangeMailContact(sessionExch,contactRecord)
Create/Update an Exchange MailUser record.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Exchange connection definition |
record* | expression, variable | the record to save |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
userRecord2 = createRecord() setRecordFieldValue(userRecord2, "Name", "testmailuser") setRecordFieldValue(userRecord2, "EmailAddresses", "testmailuser@idauto.net") saveExchangeMailUSer(sessionExch,userRecord2)
Fields supported for creating/updating on Exchange objects are documented as parameters to the New-* and Set-* Exchange Shell Cmdlets Because many objects are polymorphic, there are different cmdlets that can be applied to the same object and the set of supported attributes is based on all the applicable cmdlets, e.g. a Mailbox is also a User, a Recipient, a CASMailbox, and a MailboxRegionalConfiguration, so the set of supported attributes is the union of the Cmdlets for those 5 object types.
For all record types, the Identity field serves as the identifier for the corresponding Exchange object. On save, a record that has the Identity field will be treated as an update, whereas any record without the Identity field will be treated as a create or enable, depending on whether or not the corresponding object in AD already exists. Records returned from Exchange will always have the Identity field populated, though for purposes of getting or updating the object, any of the following can be used interchangeably as the Identity: ADObjectID, Alias, Distinguished name (DN), Domain\Account, GUID, LegacyExchangeDN, SmtpAddress, or User principal name (UPN).
For search filters, only one Exchange object type is supported for each record type, which means that searches cannot be performed across all the attributes that are supported for create/update on each record type. The list of attributes supported in search filters can be found here: http://technet.microsoft.com/en-us/library/bb738155.aspx. The syntax for searching is called OPath and is documented here: http://technet.microsoft.com/en-us/library/bb124268.aspx#OPATH. Filters should NOT be enclosed in braces { } because the adapter automatically takes care of that.
Record Type | New Cmdlet | Set Cmdslet(s) | Supported Attributes | Search Filter Object Type |
---|---|---|---|---|
Mailbox | AcceptMessagesOnlyFrom, AcceptMessagesOnlyFromDLMembers, AcceptMessagesOnlyFromSendersOrMembers, ActiveSyncAllowedDeviceIDs, ActiveSyncBlockedDeviceIDs, ActiveSyncDebugLogging, ActiveSyncEnabled, ActiveSyncMailboxPolicy, Alias, ApplyMandatoryProperties, AssistantName, BypassModerationFromSendersOrMembers, CalendarRepairDisabled, CalendarVersionStoreDisabled, City, Company, CountryOrRegion, CustomAttribute1, CustomAttribute2, CustomAttribute3, CustomAttribute4, CustomAttribute5, CustomAttribute6, CustomAttribute7, CustomAttribute8, CustomAttribute9, CustomAttribute10, CustomAttribute11, CustomAttribute12, CustomAttribute13, CustomAttribute14, CustomAttribute15, DeliverToMailboxAndForward, Department, Discovery, DisplayName, EmailAddresses, EmailAddressPolicyEnabled, EvictLiveId, ExternalOofOptions, Fax, FederatedIdentity, FirstName, Force, ForwardingAddress, GrantSendOnBehalfTo, HomePhone, Identity, ImapEnabled, ImapMessagesRetrievalMimeFormat, ImapUseProtocolDefaults, ImmutableId, ImportLiveId, Initials, Languages, LastName, MAPIEnabled, MailTip, MailTipTranslations, MailboxPlan, Manager, MessageTrackingReadStatusEnabled, MobilePhone, ModeratedBy, ModerationEnabled, Name, Notes, OWAEnabled, Office, OrganizationalUnit, OtherFax, OtherHomePhone, OtherTelephone, Pager, Password, Phone, PopEnabled, PopMessagesRetrievalMimeFormat, PopUseProtocolDefaults, PostOfficeBox, PostalCode, RejectMessagesFrom, RejectMessagesFromDLMembers, RejectMessagesFromSendersOrMembers, RemotePowerShellEnabled, RemovedMailbox, RequireSenderAuthenticationEnabled, ResetPasswordOnNextLogon, ResourceCapacity, ResourceCustom, SecondaryAddress, SendModerationNotifications, SimpleDisplayName, StateOrProvince, StreetAddress, Title, Type, UseExistingLiveId, UserCertificate, UserSMimeCertificate, WebPage, WindowsEmailAddress, DateFormat, Language, LocalizeDefaultFolderName, TimeFormat, TimeZone, PictureData | Recipient | ||
DistributionGroup | AcceptMessagesOnlyFrom, AcceptMessagesOnlyFromDLMembers, AcceptMessagesOnlyFromSendersOrMembers, Alias, BypassModerationFromSendersOrMembers, BypassNestedModerationEnabled, CopyOwnerToMember, CreateDTMFMap, CustomAttribute1, CustomAttribute2, CustomAttribute3, CustomAttribute4, CustomAttribute5, CustomAttribute6, CustomAttribute7, CustomAttribute8, CustomAttribute9, CustomAttribute10, CustomAttribute11, CustomAttribute12, CustomAttribute13, CustomAttribute14, CustomAttribute15, DisplayName, EmailAddresses, GrantSendOnBehalfTo, HiddenFromAddressListsEnabled, Identity, MailTip, MailTipTranslations, ManagedBy, MemberDepartRestriction, MemberJoinRestriction, Members, ModeratedBy, ModerationEnabled, Name, Notes, OrganizationalUnit, PhoneticDisplayName, PrimarySmtpAddress, RejectMessagesFrom, RejectMessagesFromDLMembers, RejectMessagesFromSendersOrMembers, ReportToManagerEnabled, ReportToOriginatorEnabled, RequireSenderAuthenticationEnabled, RoomList, SendModerationNotifications, SendOofMessageToOriginatorEnabled, SimpleDisplayName, Type, Universal, WindowsEmailAddress | Recipient | ||
MailContact | AcceptMessagesOnlyFrom, AcceptMessagesOnlyFromDLMembers, AcceptMessagesOnlyFromSendersOrMembers, Alias, AllowUMCallsFromNonUsers, AssistantName, BypassModerationFromSendersOrMembers, City, Company, CountryOrRegion, CreateDTMFMap, CustomAttribute1, CustomAttribute2, CustomAttribute3, CustomAttribute4, CustomAttribute5, CustomAttribute6, CustomAttribute7, CustomAttribute8, CustomAttribute9, CustomAttribute10, CustomAttribute11, CustomAttribute12, CustomAttribute13, CustomAttribute14, CustomAttribute15, Department, DisplayName, EmailAddresses, ExternalEmailAddress, Fax, FirstName, GrantSendOnBehalfTo, HiddenFromAddressListsEnabled, HomePhone, Identity, Initials, LastName, MacAttachmentFormat, MailTip, MailTipTranslations, Manager, MessageBodyFormat, MessageFormat, MobilePhone, ModeratedBy, ModerationEnabled, Name, Notes, Office, OrganizationalUnit, OtherFax, OtherHomePhone, OtherTelephone, Pager, Phone, PhoneticDisplayName, PostOfficeBox, PostalCode, RejectMessagesFrom, RejectMessagesFromDLMembers, RejectMessagesFromSendersOrMembers, RequireSenderAuthenticationEnabled, SecondaryAddress, SecondaryDialPlan, SendModerationNotifications, SimpleDisplayName, StateOrProvince, StreetAddress, TelephoneAssistant, Title, UMCallingLineIds, UMDialPlan, UseMapiRichTextFormat, UsePreferMessageFormat, WebPage, WindowsEmailAddress | Recipient | ||
MailUser | AcceptMessagesOnlyFrom, AcceptMessagesOnlyFromDLMembers, AcceptMessagesOnlyFromSendersOrMembers, Alias, AllowUMCallsFromNonUsers, AssistantName, BypassModerationFromSendersOrMembers, City, Company, CountryOrRegion, CreateDTMFMap, CustomAttribute1, CustomAttribute2, CustomAttribute3, CustomAttribute4, CustomAttribute5, CustomAttribute6, CustomAttribute7, CustomAttribute8, CustomAttribute9, CustomAttribute10, CustomAttribute11, CustomAttribute12, CustomAttribute13, CustomAttribute14, CustomAttribute15, Department, DisplayName, EmailAddresses, ExternalEmailAddress, Fax, FirstName, GrantSendOnBehalfTo, HiddenFromAddressListsEnabled, HomePhone, Identity, Initials, LastName, MacAttachmentFormat, MailTip, MailTipTranslations, Manager, MessageBodyFormat, MessageFormat, MobilePhone, ModeratedBy, ModerationEnabled, Name, Notes, Office, OrganizationalUnit, OtherFax, OtherHomePhone, OtherTelephone, Pager, Phone, PhoneticDisplayName, PostOfficeBox, PostalCode, RejectMessagesFrom, RejectMessagesFromDLMembers, RejectMessagesFromSendersOrMembers, RequireSenderAuthenticationEnabled, SecondaryAddress, SecondaryDialPlan, SendModerationNotifications, SimpleDisplayName, StateOrProvince, StreetAddress, TelephoneAssistant, Title, UMCallingLineIds, UMDialPlan, UseMapiRichTextFormat, UsePreferMessageFormat, WebPage, WindowsEmailAddress | Recipient | ||
MoveRequest | N/A | Identity, Remote, RemoteCredential, RemoteGlobalCatalog, RemoteHostName, RemoteLegacy, AcceptLargeDataLoss, ArchiveDomain, ArchiveOnly, ArchiveTargetDatabase, BadItemLimit, BatchName, Confirm, DoNotPreserveMailboxSignature, DomainController, IgnoreRuleLimitErrors, MRSServer, PrimaryOnly, Protect, RemoteOrganizationName, RemoteTargetDatabase, Suspend, SuspendComment, SuspendWhenReadyToComplete, TargetDatabase, TargetDeliveryDomain | MoveRequest |
Starting in Exchange 2010, you can initiate moving a mailbox from one database to another using createExchangeMoveRequest. There are a lot of different options provided by the cmdlet so make sure you review the Understanding Move Requests in the Exchange documentation to know which properties to set for a particular scenario.
Some scenarios require providing a credential field. A credential field requires two values, the first being the username and the second the password.
Once a move is requested you can track it's progress using getExchangeMoveRequest. You can also search for MoveRequests (with optional filter) getExchangeMoveRequests. Note that optional filter does not support OPath like all the other Exchange object types do, and that the criteria in the record used as a filter is limited to the parameters available for the Get-MoveRequest cmdlet.
One thing to keep in mind about MoveRequests is that the MoveRequest has to be deleted once mailbox move has completed before another MoveRequest can be created for that mailbox. One way to accomplish that would be to create a job that uses getExchangeMoveRequests to get a list of all the existing requests, and use deleteExchangeMoveRequest to delete any MoveRequests that have Status “Completed”. You may also want to check for and requests with Statuses “CompletedWithWarning” and “Failed” and send notification to an administrator for remediation. Deleting a MoveRequest that has not yet completed will effectively cancel the move.
The Adapter does not currently support modifying, suspending or resuming an existing MoveRequest.