This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Provisioning with O365 powershell synchronization

Hi,

 

I am trying to do provisioning by using O365 powershell connector in Q1IM 7.0.

I have the data in my UNSAccountB and mapped with User(all), when I tried to simulate see the value in insert and I started the synchronization. Please find the below error.

I have attached the xml file, I can view all the existing user account and the account I use for synchronization project is having the "Global Administrator" role.

 

 

 

o365 (1).xml
<?xml version="1.0" encoding="utf-8" ?>
<!--
	Some header data definint the id, the version and the description of this connector
-->
<PowershellConnectorDefinition Id="Office356" Version="1.0" Description="Office 365 Connector">

	<PluginAssemblies/>

	<ConnectionParameters>
		<ConnectionParameter Name="Username" Description="Username for the Active Directory connection" />
		<ConnectionParameter Name="Password" Description="Password" IsSensibleData="true" />
	</ConnectionParameters>

	<Initialization>
		<CustomCommands>

			<CustomCommand Name="Connect-D1IMOffice365">
				<![CDATA[
					param(
						[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
						[ValidateNotNullOrEmpty()]
						[String]$Username,

						[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
						[ValidateNotNullOrEmpty()]
						[String]$Password,
						
						[parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true)]
						[String]$TenantID				
					)
					
					# Module Import
					Import-Module MSOnline

					# Create Tenant Credential
					$secPwd = ConvertTo-SecureString $Password -AsPlainText:$true -force
					$cred = New-Object System.Management.Automation.PsCredential -ArgumentList $Username,$secPwd

					# Connect
					Connect-MsolService -Credential $cred

			]]>
			</CustomCommand>
			<CustomCommand Name="Set-D1IMMsolUserPassword">
				<![CDATA[
					param(
						[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
						[ValidateNotNullOrEmpty()]
						[String]$ObjectId,

						[parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true)]
						[String]$Password,
						
						[parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true)]
						[bool] $ForceChangePassword				
					)
					
					if($Password -ne "")
					{
						if($ForceChangePassword)
						{
							Set-MsolUserPassword -ObjectId $ObjectId -ForceChangePassword $ForceChangePassword -NewPassword $Password
						}
						else
						{
							Set-MsolUserPassword -ObjectId $ObjectId -NewPassword $Password -ForceChangePassword $false
						}
					}
			]]>
			</CustomCommand>
			<CustomCommand Name="Get-D1IMUserLicenses">
			<![CDATA[
				param(
					[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
					[ValidateNotNullOrEmpty()]
					[String]$ObjectId
					)
					
				$u = Get-MsolUser -ObjectId $ObjectId
				
				$licIds = @()
				foreach( $l in $u.Licenses)
				{
					$licIds += $l.AccountSkuId
				}
									
				New-Object PSObject -Property @{ 
					LicenseIds = $licIds
					}
			]]>
			</CustomCommand>
			<CustomCommand Name="Set-D1IMUserLicenses">
			<![CDATA[
				param(
					[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
					[ValidateNotNullOrEmpty()]
					[String]$ObjectId,
					
					[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
					[AllowEmptyCollection()]
					[string[]]$NewLicenses
				)
					
				$u = Get-MsolUser -ObjectId $ObjectId
			
				$licenseToAdd = @()
				$licenseToDel = @()
				$assignedLicenses = @()
				
				
				foreach( $l in $u.Licenses)
				{
					$assignedLicenses += $l.AccountSkuId
				}
				
				foreach( $l in $assignedLicenses )
				{
					if($NewLicenses -notcontains $l)
					{
						$licenseToDel += $l
					}
				}
				
				foreach( $l in $NewLicenses )
				{
					if($assignedLicenses -notcontains $l)
					{
						$licenseToAdd += $l
					}
				}

				Set-MsolUserLicense -ObjectId $ObjectId -AddLicenses $licenseToAdd -RemoveLicenses $licenseToDel
			]]>
			</CustomCommand>
			<CustomCommand Name="Add-D1IMUserLicenses">
			<![CDATA[
				param(
					[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
					[ValidateNotNullOrEmpty()]
					[String]$ObjectId,
					
					[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
					[AllowEmptyCollection()]
					[string[]]$AddLicenses
				)
				
				$u = Get-MsolUser -ObjectId $ObjectId
			
				$licenseToAdd = @()
				$assignedLicenses = @()
				
				
				foreach( $l in $u.Licenses)
				{
					$assignedLicenses += $l.AccountSkuId
				}
				
				foreach( $l in $AddLicenses )
				{
					if($assignedLicenses -notcontains $l)
					{
						$licenseToAdd += $l
					}
				}

				Set-MsolUserLicense -ObjectId $ObjectId -AddLicenses $licenseToAdd			
			]]>
			</CustomCommand>
			<CustomCommand Name="Remove-D1IMUserLicenses">
			<![CDATA[
				param(
					[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
					[ValidateNotNullOrEmpty()]
					[String]$ObjectId,
					
					[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
					[AllowEmptyCollection()]
					[string[]]$RemoveLicenses
				)
				
				$u = Get-MsolUser -ObjectId $ObjectId
			
				$licenseToDel = @()
				$assignedLicenses = @()
				
				
				foreach( $l in $u.Licenses)
				{
					if($RemoveLicenses -contains $l.AccountSkuId)
					{
						$licenseToDel += $l.AccountSkuId
					}
				}
				
				Set-MsolUserLicense -ObjectId $ObjectId -RemoveLicenses $licenseToDel			
			]]>
			</CustomCommand>
			<CustomCommand Name="Get-D1IMGroupMembers">
			<![CDATA[
				param(
					[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
					[ValidateNotNullOrEmpty()]
					[String]$ObjectId
					)
					
				$memberObjects = Get-MsolGroupMember -GroupObjectId $ObjectId
				
				$member = @()
				foreach( $m in $memberObjects)
				{
					$member += $m.ObjectId
				}
									
				New-Object PSObject -Property @{ 
					MemberIds = $member
					}			
			]]>			
			</CustomCommand>
			<CustomCommand Name="Set-D1IMGroupMembers">
			<![CDATA[
				param(
					[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
					[ValidateNotNullOrEmpty()]
					[String]$ObjectId,
					
					[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
					[AllowEmptyCollection()]
					[string[]]$NewMembers
				)
					
				$members = Get-MsolGroupMember -GroupObjectId $ObjectId
				$currObj = @()
				
				foreach( $m in $members)
				{
					$currObj += $m.ObjectId
				}
				
				foreach( $l in $currObj )
				{
					if($NewMembers -notcontains $l)
					{
						Remove-MsolGroupMember -GroupObjectId $ObjectId -GroupMemberObjectId $l
					}
				}
				
				foreach( $l in $NewMembers )
				{
					if($currObj -notcontains $l)
					{
						Add-MsolGroupMember -GroupObjectId $ObjectId -GroupMemberObjectId $l
					}
				}	
			]]>
			</CustomCommand>
			<CustomCommand Name="Add-D1IMGroupMembers">
			<![CDATA[
				param(
					[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
					[ValidateNotNullOrEmpty()]
					[String]$ObjectId,
					
					[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
					[AllowEmptyCollection()]
					[string[]]$AddMembers
				)
					
				$members = Get-MsolGroupMember -GroupObjectId $ObjectId
				$currObj = @()
				
				foreach( $m in $members)
				{
					$currObj += $m.ObjectId
				}
				
				foreach( $l in $AddMembers )
				{
					if($currObj -notcontains $l)
					{
						Add-MsolGroupMember -GroupObjectId $ObjectId -GroupMemberObjectId $l
					}
				}		
			]]>
			</CustomCommand>
			<CustomCommand Name="Remove-D1IMGroupMembers">
			<![CDATA[
				param(
					[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
					[ValidateNotNullOrEmpty()]
					[String]$ObjectId,
					
					[parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
					[AllowEmptyCollection()]
					[string[]]$RemoveMembers
				)
					
				$members = Get-MsolGroupMember -GroupObjectId $ObjectId
				$currObj = @()
				
				foreach( $m in $members)
				{
					$currObj += $m.ObjectId
				}
				
				foreach( $l in $RemoveMembers )
				{
					if($currObj -contains $l)
					{
						Remove-MsolGroupMember -GroupObjectId $ObjectId -GroupMemberObjectId $l
					}
				}		
			]]>
			</CustomCommand>			
			
		
			
		</CustomCommands>

		<PredefinedCommands>
			<Command Name="Get-MsolAccountSku" />
			<Command Name="Get-MsolCompanyInformation" />
			<Command Name="Get-MsolDomain" />
			<Command Name="Get-MsolUser" />
			<Command Name="Remove-Module" />
			<Command Name="New-MsolUser" />
			<Command Name="Set-MsolUser" />
			<Command Name="Set-MsolUserPrincipalName" />
			<Command Name="Remove-MsolUser" />
			<Command Name="New-MsolGroup" />
			<Command Name="Set-MsolGroup" />
			<Command Name="Get-MsolGroup" />
			<Command Name="Remove-MsolGroup" />
		</PredefinedCommands>

		<EnvironmentInitialization>
			<Connect>
				<CommandSequence>
					<Item Command="Connect-D1IMOffice365" Order="1">
						<SetParameter Param="Username" Source="ConnectionParameter" Value="Username" />
						<SetParameter Param="Password" Source="ConnectionParameter" Value="Password" />
					</Item>
				</CommandSequence>
			</Connect>
			<Disconnect>
				<CommandSequence>
					<Item Command="Remove-Module" Order="1">
						<SetParameter Param="Name" Source="FixedValue" Value="MSOnline" />
					</Item>
				</CommandSequence>
			</Disconnect>			
		</EnvironmentInitialization>
	</Initialization>

	<Schema>
		<Class Name="SubscribedSku">
			<Properties>
				<Property Name="AccountName" DataType="String" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolAccountSku" Path="AccountName" />
					</ReturnBindings>
				</Property>
				<Property Name="AccountObjectId" DataType="String">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolAccountSku" Path="AccountObjectId.ToString()" />
					</ReturnBindings>
				</Property>
				<Property Name="AccountSkuId" DataType="String" IsDisplay="true" IsUniqueKey="true" IsMandatory="true" IsAutoFill="true">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolAccountSku" Path="AccountSkuId" />
					</ReturnBindings>
				</Property>
				<Property Name="ActiveUnits" DataType="Int">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolAccountSku" Path="ActiveUnits" />
					</ReturnBindings>
				</Property>				
				<Property Name="ConsumedUnits" DataType="Int">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolAccountSku" Path="ConsumedUnits" />
					</ReturnBindings>
				</Property>				
				<Property Name="LockedOutUnits" DataType="Int">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolAccountSku" Path="LockedOutUnits" />
					</ReturnBindings>
				</Property>
				<Property Name="SkuId" DataType="String">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolAccountSku" Path="SkuId.ToString()" />
					</ReturnBindings>
				</Property>					
				<Property Name="SkuPartNumber" DataType="String">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolAccountSku" Path="SkuPartNumber" />
					</ReturnBindings>
				</Property>					
				<Property Name="SuspendedUnits" DataType="Int">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolAccountSku" Path="SuspendedUnits" />
					</ReturnBindings>
				</Property>
				<Property Name="WarningUnits" DataType="Int">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolAccountSku" Path="WarningUnits" />
					</ReturnBindings>
				</Property>				
				<Property Name="SubscriptionIds" DataType="String" IsMultivalue="true">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolAccountSku" Path="SubscriptionIds" />
					</ReturnBindings>
				</Property>
				
			</Properties>
			
			<ReadConfiguration>
				<ListingCommand Command="Get-MsolAccountSku" />
				<CommandSequence>
					<Item Command="Get-MsolAccountSku" Order="1" />
				</CommandSequence>
			</ReadConfiguration>			
		</Class>
		
		<Class Name="CompanyInfo">
			<Properties>
				<Property Name="DisplayName" DataType="String" IsDisplay="true">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="DisplayName" />
					</ReturnBindings>
				</Property>
				<Property Name="PreferredLanguage" DataType="String" IsUniqueKey="true" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="PreferredLanguage" />
					</ReturnBindings>
				</Property>
				<Property Name="Street" DataType="String">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="Street" />
					</ReturnBindings>
				</Property>
				<Property Name="City" DataType="String">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="City" />
					</ReturnBindings>
				</Property>				
				<Property Name="State" DataType="String">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="State" />
					</ReturnBindings>
				</Property>				
				<Property Name="PostalCode" DataType="String">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="PostalCode" />
					</ReturnBindings>
				</Property>	
				<Property Name="Country" DataType="String">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="Country" />
					</ReturnBindings>
				</Property>	
				<Property Name="CountryLetterCode" DataType="String">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="CountryLetterCode" />
					</ReturnBindings>
				</Property>					
				<Property Name="TelephoneNumber" DataType="String">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="TelephoneNumber" />
					</ReturnBindings>
				</Property>
				<Property Name="MarketingNotificationEmails" DataType="String" IsMultivalue="true">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="MarketingNotificationEmails" />
					</ReturnBindings>
				</Property>				
				<Property Name="TechnicalNotificationEmails" DataType="String" IsMultivalue="true">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="TechnicalNotificationEmails" />
					</ReturnBindings>
				</Property>	
				<Property Name="SelfServePasswordResetEnabled" DataType="Bool">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="SelfServePasswordResetEnabled" />
					</ReturnBindings>
				</Property>				
				<Property Name="UsersPermissionToCreateGroupsEnabled" DataType="Bool">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="UsersPermissionToCreateGroupsEnabled" />
					</ReturnBindings>
				</Property>				
				<Property Name="UsersPermissionToCreateLOBAppsEnabled" DataType="Bool">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="UsersPermissionToCreateLOBAppsEnabled" />
					</ReturnBindings>
				</Property>				
				<Property Name="UsersPermissionToReadOtherUsersEnabled" DataType="Bool">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="UsersPermissionToReadOtherUsersEnabled" />
					</ReturnBindings>
				</Property>	
				<Property Name="UsersPermissionToUserConsentToAppEnabled" DataType="Bool">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="UsersPermissionToUserConsentToAppEnabled" />
					</ReturnBindings>
				</Property>	
				<Property Name="DirectorySynchronizationEnabled" DataType="Bool">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="DirectorySynchronizationEnabled" />
					</ReturnBindings>
				</Property>	
				<Property Name="LastDirSyncTime" DataType="String">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="LastDirSyncTime.ToString()" />
					</ReturnBindings>
				</Property>	
				<Property Name="LastPasswordSyncTime" DataType="String">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="LastPasswordSyncTime.ToString()" />
					</ReturnBindings>
				</Property>	
				<Property Name="PasswordSynchronizationEnabled" DataType="Bool">
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolCompanyInformation" Path="PasswordSynchronizationEnabled" />
					</ReturnBindings>
				</Property>
			</Properties>
			
			<ReadConfiguration>
				<ListingCommand Command="Get-MsolCompanyInformation" />
				<CommandSequence>
					<Item Command="Get-MsolCompanyInformation" Order="1" />
				</CommandSequence>
			</ReadConfiguration>			
		</Class>		
		
		<Class Name="Domain">
			<Properties>
				<Property Name="Name" DataType="String" IsUniqueKey="true" IsDisplay="true">
					<CommandMappings>
						<Map ToCommand="Get-MsolDomain" Parameter="DomainName"/>
					</CommandMappings>
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolDomain" Path="Name" />
					</ReturnBindings>
				</Property>
				<Property Name="Authentication" DataType="String" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolDomain" Path="Authentication.ToString()" />
					</ReturnBindings>
				</Property>					
				<Property Name="Capabilities" DataType="String" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolDomain" Path="Capabilities.ToString()" />
					</ReturnBindings>
				</Property>				
				<Property Name="IsDefault" DataType="Bool" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolDomain" Path="IsDefault" />
					</ReturnBindings>
				</Property>			
				<Property Name="IsInitial" DataType="Bool" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolDomain" Path="IsInitial" />
					</ReturnBindings>
				</Property>			
				<Property Name="RootDomain" DataType="String" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolDomain" Path="RootDomain" />
					</ReturnBindings>
				</Property>			
				<Property Name="Status" DataType="String" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolDomain" Path="Status.ToString()" />
					</ReturnBindings>
				</Property>			
				<Property Name="VerificationMethod" DataType="String" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolDomain" Path="VerificationMethod.ToString()" />
					</ReturnBindings>
				</Property>			
			</Properties>
			
			<ReadConfiguration>
				<ListingCommand Command="Get-MsolDomain" />
				<CommandSequence>
					<Item Command="Get-MsolDomain" Order="1" />
				</CommandSequence>
			</ReadConfiguration>			
		</Class>

		<Class Name="User">
			<Properties>
				
				<Property Name="ObjectId" DataType="String" IsUniqueKey="true" >
					<CommandMappings>
						<Map ToCommand="Get-MsolUser" Parameter="ObjectId" />
						<Map ToCommand="Set-MsolUserPrincipalName" Parameter="ObjectId" />
						<Map ToCommand="Set-MsolUser" Parameter="ObjectId" />
						<Map ToCommand="Remove-MsolUser" Parameter="ObjectId" />
						<Map ToCommand="Set-D1IMMsolUserPassword" Parameter="ObjectId" />
						<Map ToCommand="Get-D1IMUserLicenses" Parameter="ObjectId" />
						<Map ToCommand="Set-D1IMUserLicenses" Parameter="ObjectId" />
						<Map ToCommand="Add-D1IMUserLicenses" Parameter="ObjectId" />
						<Map ToCommand="Remove-D1IMUserLicenses" Parameter="ObjectId" />
					</CommandMappings>
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="ObjectId" />
						<Bind CommandResultOf="New-MsolUser" Path="ObjectId" />
					</ReturnBindings>
				</Property>
				
				<Property Name="AlternateEmailAddresses" DataType="String" IsMultivalue="true" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="AlternateEmailAddresses" />
					</ReturnBindings>
				</Property>			
				
				<Property Name="AlternateMobilePhones" DataType="String" IsMultivalue="true" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="AlternateMobilePhones" />
					</ReturnBindings>
				</Property>			
				
				<Property Name="BlockCredential" DataType="Bool" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="BlockCredential" />
						<Map ToCommand="Set-MsolUser" Parameter="BlockCredential" />
					</CommandMappings>
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>					
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="BlockCredential" />
					</ReturnBindings>
				</Property>	
				
				<Property Name="City" DataType="String" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="City" />
						<Map ToCommand="Set-MsolUser" Parameter="City" />
					</CommandMappings>
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>					
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="City" />
					</ReturnBindings>
				</Property>	
				
				<Property Name="Country" DataType="String" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="Country" />
						<Map ToCommand="Set-MsolUser" Parameter="Country" />
					</CommandMappings>
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>					
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="Country" />
					</ReturnBindings>
				</Property>
				
				<Property Name="Department" DataType="String" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="Department" />
						<Map ToCommand="Set-MsolUser" Parameter="Department" />
					</CommandMappings>
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>					
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="Department" />
					</ReturnBindings>
				</Property>
				
				<Property Name="DisplayName" DataType="String" IsDisplay="true" IsMandatory="true" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="DisplayName" />
						<Map ToCommand="Set-MsolUser" Parameter="DisplayName" />
					</CommandMappings>
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>					
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="DisplayName" />
					</ReturnBindings>
				</Property>
				
				<Property Name="Fax" DataType="String" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="Fax" />
						<Map ToCommand="Set-MsolUser" Parameter="Fax" />
					</CommandMappings>
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>						
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="Fax" />
					</ReturnBindings>
				</Property>
				
				<Property Name="Firstname" DataType="String" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="Firstname" />
						<Map ToCommand="Set-MsolUser" Parameter="Firstname" />
					</CommandMappings>
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>					
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="Firstname" />
					</ReturnBindings>
				</Property>				
				
				<Property Name="ImmutableId" DataType="String" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="ImmutableId" />
					</CommandMappings>
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="ImmutableId" />
					</ReturnBindings>
				</Property>
				
				<Property Name="IsLicensed" DataType="Bool" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="IsLicensed" />
					</ReturnBindings>
				</Property>
				
				<Property Name="LastDirSyncTime" DataType="DateTime" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="LastDirSyncTime" />
					</ReturnBindings>
				</Property>
				
				<Property Name="LastName" DataType="String" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="LastName" />
						<Map ToCommand="Set-MsolUser" Parameter="LastName" />
					</CommandMappings>
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>					
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="LastName" />
					</ReturnBindings>
				</Property>	
				
				<Property Name="LastPasswordChangeTimestamp" DataType="DateTime" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="LastPasswordChangeTimestamp" />
					</ReturnBindings>
				</Property>			
				
				<Property Name="MobilePhone" DataType="String" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="MobilePhone" />
						<Map ToCommand="Set-MsolUser" Parameter="MobilePhone" />
					</CommandMappings>
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>					
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="MobilePhone" />
					</ReturnBindings>
				</Property>	
				
				<Property Name="Office" DataType="String" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="Office" />
						<Map ToCommand="Set-MsolUser" Parameter="Office" />
					</CommandMappings>	
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>					
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="Office" />
					</ReturnBindings>
				</Property>	
				
				<Property Name="PasswordNeverExpires" DataType="Bool" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="PasswordNeverExpires" />
					</ReturnBindings>
				</Property>	
				
				<Property Name="PasswordResetNotRequiredDuringActivate" DataType="Bool" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="PasswordResetNotRequiredDuringActivate" />
					</ReturnBindings>
				</Property>	
				
				<Property Name="PhoneNumber" DataType="String" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="PhoneNumber" />
						<Map ToCommand="Set-MsolUser" Parameter="PhoneNumber" />
					</CommandMappings>	
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>					
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="PhoneNumber" />
					</ReturnBindings>
				</Property>					
				
				<Property Name="PostalCode" DataType="String" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="PostalCode" />
						<Map ToCommand="Set-MsolUser" Parameter="PostalCode" />
					</CommandMappings>				
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>					
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="PostalCode" />
					</ReturnBindings>
				</Property>					
				
				<Property Name="PreferredLanguage" DataType="String" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="PreferredLanguage" />
						<Map ToCommand="Set-MsolUser" Parameter="PreferredLanguage" />
					</CommandMappings>
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>					
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="PreferredLanguage" />
					</ReturnBindings>
				</Property>
				
				<Property Name="ProxyAddresses" DataType="String" IsMultivalue="true" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="ProxyAddresses" />
					</ReturnBindings>
				</Property>				
				
				<Property Name="State" DataType="String" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="State" />
						<Map ToCommand="Set-MsolUser" Parameter="State" />
					</CommandMappings>
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>					
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="State" />
					</ReturnBindings>
				</Property>				
				
				<Property Name="StreetAddress" DataType="String" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="StreetAddress" />
						<Map ToCommand="Set-MsolUser" Parameter="StreetAddress" />
					</CommandMappings>
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>					
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="StreetAddress" />
					</ReturnBindings>
				</Property>	
				
				<Property Name="Title" DataType="String" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="Title" />
						<Map ToCommand="Set-MsolUser" Parameter="Title" />
					</CommandMappings>
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="Title" />
					</ReturnBindings>
				</Property>	
				
				<Property Name="UsageLocation" DataType="String" >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="UsageLocation" />
						<Map ToCommand="Set-MsolUser" Parameter="UsageLocation" />
					</CommandMappings>				
					<ModifiedBy>
						<ModBy Command="Set-MsolUser" />
					</ModifiedBy>
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="UsageLocation" />
					</ReturnBindings>
				</Property>
				
				<Property Name="UserPrincipalName" DataType="String" IsMandatory="true"  >
					<CommandMappings>
						<Map ToCommand="New-MsolUser" Parameter="UserPrincipalName" />
						<Map ToCommand="Set-MsolUserPrincipalName" Parameter="UserPrincipalName" />
					</CommandMappings>
					<ModifiedBy>
						<ModBy Command="Set-MsolUserPrincipalName" />
					</ModifiedBy>
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="UserPrincipalName" />
					</ReturnBindings>
				</Property>
				
				<Property Name="UserType" DataType="String" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="UserType.ToString()" />
					</ReturnBindings>
				</Property>	
				
				<Property Name="Password" DataType="String" >
					<CommandMappings>
						<Map ToCommand="Set-D1IMMsolUserPassword" Parameter="Password" />
					</CommandMappings>
					<ModifiedBy>
						<ModBy Command="Set-D1IMMsolUserPassword" />
					</ModifiedBy>
				</Property>	
				
				<Property Name="ForceChangePassword" DataType="Bool" >
					<CommandMappings>
						<Map ToCommand="Set-D1IMMsolUserPassword" Parameter="ForceChangePassword" />
					</CommandMappings>
					<ModifiedBy>
						<ModBy Command="Set-D1IMMsolUserPassword" />
					</ModifiedBy>
				</Property>	

				<Property Name="Licenses" DataType="String" IsMultivalue="true">
					<ReferenceTargets>
						<ReferenceTarget Class="SubscribedSku" Property="AccountSkuId" />
					</ReferenceTargets>
					<ReturnBindings>
						<Bind CommandResultOf="Get-D1IMUserLicenses" Path="LicenseIds" />
					</ReturnBindings>
					<ModifiedBy>
						<ModBy Command="Set-D1IMUserLicenses" />
						<ModBy Command="Add-D1IMUserLicenses" />
						<ModBy Command="Remove-D1IMUserLicenses" />
					</ModifiedBy>	  
					<CommandMappings>
						<Map ToCommand="Add-D1IMUserLicenses" Parameter="AddLicenses" ModType="Add" />
						<Map ToCommand="Remove-D1IMUserLicenses" Parameter="RemoveLicenses" ModType="Remove" />
						<Map ToCommand="Set-D1IMUserLicenses" Parameter="NewLicenses" ModType="Replace" />
					</CommandMappings>		  
					
				</Property>	
				
			</Properties>
			
			<ReadConfiguration>
				<ListingCommand Command="Get-MsolUser">
					<SetParameter Param="All" Source="SwitchParameter" Value="" />
				</ListingCommand>
				<CommandSequence>
					<Item Command="Get-MsolUser" Order="1" />
					<Item Command="Get-D1IMUserLicenses" Order="2" />
				</CommandSequence>
			</ReadConfiguration>

			<MethodConfiguration>
				<Method Name="Insert">
					<CommandSequence>
						<Item Command="New-MsolUser" Order="1" />
						<Item Command="Set-D1IMMsolUserPassword" Order="2" Condition="ModificationExists" />
						<Item Command="Add-D1IMUserLicenses" Order="3" Condition="ModificationExists"/>
						<Item Command="Remove-D1IMUserLicenses" Order="4" Condition="ModificationExists"/>
						<Item Command="Set-D1IMUserLicenses" Order="5" Condition="ModificationExists"/>
						
					</CommandSequence>
				</Method>
				<Method Name="Update">
					<CommandSequence>
						<Item Command="Set-MsolUser" Order="1" Condition="ModificationExists" />
						<Item Command="Set-D1IMMsolUserPassword" Order="2" Condition="ModificationExists" />
						<Item Command="Set-MsolUserPrincipalName" Order="3" Condition="ModificationExists" />
						<Item Command="Add-D1IMUserLicenses" Order="4" Condition="ModificationExists"/>
						<Item Command="Remove-D1IMUserLicenses" Order="5" Condition="ModificationExists"/>
						<Item Command="Set-D1IMUserLicenses" Order="6" Condition="ModificationExists"/>
					</CommandSequence>
				</Method>
				<Method Name="Delete">
					<CommandSequence>
						<Item Command="Remove-MsolUser" Order="1">
							<SetParameter Param="Force" Source="SwitchParameter" Value="" />
						</Item>
					</CommandSequence>
				</Method>
				
			</MethodConfiguration>
		</Class>		

		<Class Name="Group">
		
			<Properties>
				
				<Property Name="ObjectId" DataType="String" IsUniqueKey="true" >
					<CommandMappings>
						<Map ToCommand="Get-MsolGroup" Parameter="ObjectId" />
						<Map ToCommand="Set-MsolGroup" Parameter="ObjectId" />
						<Map ToCommand="Remove-MsolGroup" Parameter="ObjectId" />
						<Map ToCommand="Get-D1IMGroupMembers" Parameter="ObjectId" />
						<Map ToCommand="Set-D1IMGroupMembers" Parameter="ObjectId" />
						<Map ToCommand="Add-D1IMGroupMembers" Parameter="ObjectId" />
						<Map ToCommand="Remove-D1IMGroupMembers" Parameter="ObjectId" />
					</CommandMappings>
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolGroup" Path="ObjectId" />
						<Bind CommandResultOf="New-MsolGroup" Path="ObjectId" />
					</ReturnBindings>
				</Property>
				
				<Property Name="DisplayName" DataType="String" IsDisplay="true" IsMandatory="true" >
					<CommandMappings>
						<Map ToCommand="New-MsolGroup" Parameter="DisplayName" />
						<Map ToCommand="Set-MsolGroup" Parameter="DisplayName" />
					</CommandMappings>		  
					<ModifiedBy>
						<ModBy Command="Set-MsolGroup" />
					</ModifiedBy>	  
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolGroup" Path="DisplayName" />
					</ReturnBindings>
				</Property>	

				<Property Name="Description" DataType="String"  >
					<CommandMappings>
						<Map ToCommand="New-MsolGroup" Parameter="Description" />
						<Map ToCommand="Set-MsolGroup" Parameter="Description" />
					</CommandMappings>		  
					<ModifiedBy>
						<ModBy Command="Set-MsolGroup" />
					</ModifiedBy>	  
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolGroup" Path="Description" />
					</ReturnBindings>
				</Property>					

				<Property Name="EmailAddress" DataType="String" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolGroup" Path="EmailAddress" />
					</ReturnBindings>
				</Property>			

				<Property Name="GroupType" DataType="String" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolGroup" Path="GroupType.ToString()" />
					</ReturnBindings>
				</Property>

				<Property Name="IsSystem" DataType="Bool" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolGroup" Path="IsSystem" />
					</ReturnBindings>
				</Property>	

				<Property Name="LastDirSyncTime" DataType="DateTime" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolGroup" Path="LastDirSyncTime" />
					</ReturnBindings>
				</Property>
				
				<Property Name="ProxyAddresses" DataType="String" IsMultivalue="true" >
					<ReturnBindings>
						<Bind CommandResultOf="Get-MsolUser" Path="ProxyAddresses" />
					</ReturnBindings>
				</Property>

				<Property Name="Members" DataType="String" IsMultivalue="true" >
					<ReferenceTargets>
						<ReferenceTarget Class="User" Property="ObjectId" />
					</ReferenceTargets>
					<ModifiedBy>
						<ModBy Command="Set-D1IMGroupMembers" />
						<ModBy Command="Add-D1IMGroupMembers" />
						<ModBy Command="Remove-D1IMGroupMembers" />
					</ModifiedBy>	  
					<CommandMappings>
						<Map ToCommand="Add-D1IMGroupMembers" Parameter="AddMembers" ModType="Add" />
						<Map ToCommand="Remove-D1IMGroupMembers" Parameter="RemoveMembers" ModType="Remove" />
						<Map ToCommand="Set-D1IMGroupMembers" Parameter="NewMembers" ModType="Replace" />
					</CommandMappings>		  
					
					<ReturnBindings>
						<Bind CommandResultOf="Get-D1IMGroupMembers" Path="MemberIds" />
					</ReturnBindings>
				</Property>
				
			</Properties>
			
			<ReadConfiguration>
				<ListingCommand Command="Get-MsolGroup">
					<SetParameter Param="All" Source="SwitchParameter" Value="" />
				</ListingCommand>
				<CommandSequence>
					<Item Command="Get-MsolGroup" Order="1" />
					<Item Command="Get-D1IMGroupMembers" Order="2" />
				</CommandSequence>
			</ReadConfiguration>

			<MethodConfiguration>
				<Method Name="Insert">
					<CommandSequence>
						<Item Command="New-MsolGroup" Order="1" />
						<Item Command="Add-D1IMGroupMembers" Order="2" Condition="ModificationExists"/>
						<Item Command="Remove-D1IMGroupMembers" Order="3" Condition="ModificationExists"/>
						<Item Command="Set-D1IMGroupMembers" Order="4" Condition="ModificationExists"/>
					</CommandSequence>
				</Method>
				<Method Name="Update">
					<CommandSequence>
						<Item Command="Set-MsolGroup" Order="1" Condition="ModificationExists" />
						<Item Command="Add-D1IMGroupMembers" Order="2" Condition="ModificationExists"/>
						<Item Command="Remove-D1IMGroupMembers" Order="3" Condition="ModificationExists"/>
						<Item Command="Set-D1IMGroupMembers" Order="4" Condition="ModificationExists"/>
					</CommandSequence>
				</Method>
				<Method Name="Delete">
					<CommandSequence>
						<Item Command="Remove-MsolGroup" Order="1">
							<SetParameter Param="Force" Source="SwitchParameter" Value="" />
						</Item>
					</CommandSequence>
				</Method>
				
			</MethodConfiguration>			
		
		</Class>
		
	</Schema>

</PowershellConnectorDefinition>

 

Regards,

Vijay

Parents
  • Looks like it cant find the cmd Connect-MsolService in our powershell environment. You must install the powershell addons. Do this on the machine where the jobservice is running and under the same account as the service is running. Start powershell there and try the Connect-MsolService cmd. If it's not recognized try to run Import-Module MSOnline first.

    See technet.microsoft.com/.../dn975125.aspx for required sw.
Reply
  • Looks like it cant find the cmd Connect-MsolService in our powershell environment. You must install the powershell addons. Do this on the machine where the jobservice is running and under the same account as the service is running. Start powershell there and try the Connect-MsolService cmd. If it's not recognized try to run Import-Module MSOnline first.

    See technet.microsoft.com/.../dn975125.aspx for required sw.
Children
No Data