Skip to content

Support setting customSecurityAttributes to Microsoft.Graph/servicePrincipals #244

@dkershaw10

Description

@dkershaw10

Bicep version
0.36.1

Resource and API version
0.2.0-preview beta and v1.0

Auth flow
Doesn't matter

Describe the bug
I want to update a service principal resource with some custom security attributes (CSAs).
However, there's no Bicep examples of how to do this and IntelliSense doesn't seem to know about CSAs and I see it's missing from the Bicep types definition.

Additional context
The Microsoft.Graph/servicePrincipals Bicep type does not specify a CSA. There isn't currently a way to support customSecurityAttributes in the Bicep type definition, as the underlying Microsoft Graph type is an open type with dynamic schema. That said, the customSecurityAttributes property can be defined in the Bicep template file (although the Bicep extension will warn that this is an unknown property). The template could in theory also be deployed, as the Graph Bicep extension will passthrough unknown properties to Microsoft Graph.

However, the deployment still fails with a 403 Forbidden, as the Graph Bicep extension currently doesn't have the necessary permissions to read and write CSAs.

Metadata

Metadata

Labels

bugSomething isn't workingtriagedTeam has triaged the item

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions