microsoftgraph / microsoftgraph/entra-powershell
Inconsistent type casts for Entra commands' parameters
Open
@KenitoInc is already working on this.
Since Aug 7, 2025.
enhancement
P1
Triaged
- Dominant language
- PowerShell
- Stars
- 213
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
This is a partial list of Set-EntraServicePrincipal parameters:
Parameter Aliases Type
--------- ------- ----
AlternativeNames System.Collections.Generic.List`1[System.String]
ReplyUrls System.Collections.Generic.List`1[System.String]
AppRoleAssignmentRequired System.Nullable`1[System.Boolean]
KeyCredentials System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]
ServicePrincipalNames System.Collections.Generic.List`1[System.String]
Tags System.Collections.Generic.List`1[System.String]
PasswordCredentials System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]
Let's compare it to Update-MgServicePrincipal:
Parameter Aliases Type
--------- ------- ----
AlternativeNames System.String[]
ReplyUrls System.String[]
AppRoleAssignmentRequired System.Management.Automation.SwitchParameter
KeyCredentials Microsoft.Graph.PowerShell.Models.IMicrosoftGraphKeyCredential[]
ServicePrincipalNames System.String[]
Tags System.String[]
PasswordCredentials Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPasswordCredential[]
System.Collections.Generic.List`1[System.String] instead of System.String[]
System.Nullable`1[System.Boolean] instead of System.Management.Automation.SwitchParameter
System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential] instead of Microsoft.Graph.PowerShell.Models.IMicrosoftGraphKeyCredential[]
System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential] instead of Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPasswordCredential[]
Unnecessary generic lists, Boolean instead of switch parameters, AzureAD-based types instead of Microsoft Graph-based ones...
This applies to almost all Entra PowerShell commands. -All parameter is correctly changed to be a switch parameter, but the changes stopped there.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.