Check to see if role already exists, not that roles exist. (#131)
This commit is contained in:
Родитель
470fd0d38e
Коммит
87030e2f89
|
@ -37,8 +37,10 @@ function Set-FhirServerApiApplicationRoles {
|
|||
$desiredAppRoles = @()
|
||||
|
||||
foreach ($role in $RoleConfiguration) {
|
||||
if($azureAdApplication.AppRoles) {
|
||||
$id = ($azureAdApplication.AppRoles | Where-Object Value -eq $role.name).Id
|
||||
$existingAppRole = $azureAdApplication.AppRoles | Where-Object Value -eq $role.name
|
||||
|
||||
if($existingAppRole) {
|
||||
$id = $existingAppRole.Id
|
||||
}
|
||||
else {
|
||||
$id = New-Guid
|
||||
|
|
Загрузка…
Ссылка в новой задаче