Closed Gijsreyn closed 11 months ago
Thanks for filing this issue. We'll investigate and come back to you.
@Gijsreyn I think there might be a bug in your script definition. appRoles
is an array, but it seems like you've declared your parameter as a complex type/structure (which would be a single record in the array).
When I copy your code, I even see a squiggly line under the appRoles defintions in the main.bicep file, with this error:
The property "appRoles" expected a value of type "MicrosoftGraphAppRole[] | null" but the provided value is of type "
This worked for me (note I renamed the appRoles
param to appRole
in mine - I also needed to add provider 'microsoftGraph@1.0.0'
at the beginning of the Bicep file.):
param appRole appRoleType
resource application 'Microsoft.Graph/applications@beta' = {
name: name
displayName: displayName
appRoles: [appRole] ?? []
}
Does this work for you? BTW - is intellisense working for you?
@dkershaw10 Chips, just a little mistake from my end then.
No intellisense does not fully work. Doesn't it have to do something with the language server on the compiler and the provider, maybe?
Thanks. OK - closing this issue now.
Creating user-defined types on appRoles in
Microsoft.Graph/applications@beta
, throws me an error of the following: Property appRoles in payload has a value that does not match schema.main.bicep
main.bicepparam
When simple adding the properties hardcoded, the Inputs parameters are exactly the same.