Azure / Azure/azure-powershell
[Feature]: New-AzADServicePrincipal without creating app secret
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
### Description of the new feature
When utilising federated identity credential such as on GitHub, a client secret is never needed as part of the app registration/spn. It seems currently as part of `New-AzADServicePrincipal`, with no application id provided, it creates a client secret assumedly as a convenience as it's likely needed to quickstart the usage of the new credential. It would be nice to skip this secret creation so the app never needs and doesn't report in a years time of expiring secrets
To achieve this I have to do the two step process of `New-AzADApplication` and then `New-AzADServicePrincipal` with the previous application id. The convenience of `New-AzADServicePrincipal` that creates both together is nice, but an option to skip the default creation of client secret would be desirable.
### Proposed implementation details (optional)
Something along the lines of:
`New-AzADServicePrincipal -DisplayName sample -SkipPasswordCreation`
I did try passing in an empty array to `-PasswordCredential` parameter with `New-AzADServicePrincipal -DisplayName sample2 -PasswordCredential @()` with the current release, but got the error `New-AzADServicePrincipal: Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.` where an empty array wasn't accepted
Contributor guide
Assessment
This issue has not been assessed yet.