-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Role definitions during deployment #136
Conversation
…r and updated deployment documentation
Since we are "promoting" this to the public scripts: try {
New-AzureADServiceAppRoleAssignment -ObjectId $ObjectId -PrincipalId $ObjectId -ResourceId $apiApplication.ObjectId -Id $role | Out-Null
}
catch {
Write-Host "Powershell reported failure adding app role assignment for service principal."
} Maybe we could check in the catch block that the assignment went though, and not log anything if it has. |
samples/scripts/PowerShell/FhirServer/Public/New-FhirServerClientApplicationRegistration.ps1
Outdated
Show resolved
Hide resolved
@johnstairs added a check to see if role is in fact assigned when role assignment throws error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a few cleanup items, but overall looks good.
.PARAMETER FhirServiceName | ||
Name of the FHIR service instance. | ||
.PARAMETER FhirServiceAudience | ||
Full URL of the FHIR service. | ||
.PARAMETER WebAppSuffix | ||
Will be appended to FHIR service name to form the FhirServiceAudience if one is not supplied, | ||
e.g., azurewebsites.net or azurewebsites.us (for US Government cloud) | ||
.PARAMETER AppRole |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be AppRoles
@@ -16,6 +16,8 @@ function New-FhirServerClientApplicationRegistration { | |||
Identifier URI for the client AAD Application registration | |||
.PARAMETER PublicClient | |||
Switch to indicate if the client application should be a public client (desktop/mobile applications) | |||
.PARAMETER Roles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a parameter on this script.
.PARAMETER ApiAppId | ||
The objectId of the API application that has roles that need to be assigned | ||
.PARAMETER AppRoles | ||
The collection of roles from the testauthenvironment.json for the client application |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer just from testauthenvironment.json
.EXAMPLE | ||
Set-FhirServerUserAppRoleAssignments -UserPrincipalName <User Principal Name> -ApiAppId <Resource Api Id> -AppRoles admin,nurse | ||
.PARAMETER Upn | ||
The AppId of the of the client application |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mismatch on the description and parameter
.PARAMETER Upn | ||
The AppId of the of the client application | ||
.PARAMETER ApiAppId | ||
The objectId of the API application that has roles that need to be assigned |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mismatch on the description and parameter
Set AppRoles for a given user. Requires Azure AD admin privileges. | ||
.EXAMPLE | ||
Set-FhirServerUserAppRoleAssignments -UserPrincipalName <User Principal Name> -ApiAppId <Resource Api Id> -AppRoles admin,nurse | ||
.PARAMETER Upn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parameter name doesn't match between documentation and actual parameter
Closes #135
Closes #128