Skip to content

Remove chatUtil.convertParticipantStringToArray from code. Only split by comma. #3340

@Jwaegebaert

Description

@Jwaegebaert

Decision

We decided that we won't introduce splitting strings by space in powershell. Instead we advise people to use quotes. The existing splitter needs to be removed.

The Idea that sparked the discussion (for reference sake)

The idea is to refactor the chatUtil.convertParticipantStringToArray function to the formatting util class and rename it to splitOptionsStringToArray. This mainly so that this function could be used in multiple places. Any command that uses .split(',') on an option parameter qualifies for this.
Split doesn't work in PowerShell if the user runs the command as --option variable1,variable2 (without the quotes ""). This is because commas are reserved characters. PowerShell will convert it to an array and concatenate the values with a space. Original comment by @martinlingstuyl #3315 (comment)

Commands to adjust:

Command Comma-separated option(s)
aad app add redirectUris, apisDelegated, apisApplication
aad app set redirectUris, redirectUrisToRemove
aad o365group add owners, members
aad o365group set owners, members
aad siteclassification enable classifications
aad siteclassification set classifications
aad user get properties
aad user list properties
graph schemaextension add targetTypes
graph schemaextension set targetTypes
graph subscription add changeType
outlook mail send to
planner task add assignedToUserIds, assignedToUserNames, appliedCategories
planner task set assignedToUserIds, assignedToUserNames, appliedCategories
search externalconnection add authorizedAppIds
spo search selectProperties
spo hubsite rights grant principals
spo hubsite rights revoke principals
spo list get properties
spo listitem get properties
spo listitem list fields
spo mail send to, cc, bcc
spo page header set authors
spo site add owners
spo site classic set owners
spo site ensure owners
spo site set owners
spo sitedesign add siteScripts
spo sitedesign rights grant principals
spo sitedesign rights revoke principals
spo sitedesign set siteScripts
teams chat get participants
teams chat message send userEmails
teams team clone partsToClone

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions