зеркало из
1
0
Форкнуть 0

Data Product Batch: Adding PowerShell method for creating service principal (#128)

This commit is contained in:
Hamood 2023-06-15 15:59:45 -04:00 коммит произвёл GitHub
Родитель 8252304826
Коммит 579d91e8dc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -34,6 +34,19 @@ This will generate the following JSON output:
> **Note:** Take note of the output. It will be required for the next steps.
**Azure PowerShell:**
```powershell
# Ensure you are in the right subscription
Set-AzContext -Subscription "{SubscriptionId or SubscriptionName}"
# Create service principal
$sp = New-AzADServicePrincipal -DisplayName {name}
$sp.PasswordCredentials.SecretText
```
The returned object contains the generated password. Make sure that you store this value somewhere secure to authenticate with the service principal.
> **Note:** Beginning with Az PowerShell module version 7.x, `New-AzADServicePrincipal` no longer assigns the Contributor role to the service principal by default. Follow steps below to grant it the `Contributor` role.
## Adding additional role assigments
For automation purposes, more role assignments are required for the service principal.