Problem
The refreshed beta Security OpenAPI document contains two free-form object schemas that AutoREST.PowerShell generates as the invalid C# type undefined.undefined:
microsoft.graph.security.securityCopilot.prompt.inputs
- References
microsoft.graph.Dictionary.
microsoft.graph.Dictionary is defined as type: object with additionalProperties: { type: object }.
microsoft.graph.security.detectionAction.responseActions[]
- References
microsoft.graph.security.responseAction.
microsoft.graph.security.responseAction is an empty type: object with additionalProperties: { type: object }.
The generated beta Security module fails C# compilation with errors such as:
error CS0246: The type or namespace name 'undefined' could not be found
Affected generated models include:
MicrosoftGraphSecurityCopilotPrompt
MicrosoftGraphSecurityDetectionAction
Required OpenAPI correction
Update these schemas to use concrete, generator-supported types. If these values are intentionally arbitrary JSON, model them using the supported free-form object representation rather than an object whose values are themselves untyped objects. The exact schema should reflect the API contract for:
- Security Copilot prompt input values
- Custom detection response actions
Temporary SDK workaround
PR #3701 removes only these two properties from AutoREST's in-memory OpenAPI document using directives in src/Security/Security.md:
microsoft.graph.security.securityCopilot.prompt.inputs
microsoft.graph.security.detectionAction.responseActions
This preserves the associated endpoints and other model properties while allowing beta Security generation and compilation to complete.
Completion criteria
- Correct both schemas in the source OpenAPI transforms.
- Confirm AutoREST.PowerShell generates valid C# types for both properties.
- Remove the temporary property-removal directives from
src/Security/Security.md.
- Regenerate and build the beta Security module successfully.
Related: #3701
Problem
The refreshed beta Security OpenAPI document contains two free-form object schemas that AutoREST.PowerShell generates as the invalid C# type
undefined.undefined:microsoft.graph.security.securityCopilot.prompt.inputsmicrosoft.graph.Dictionary.microsoft.graph.Dictionaryis defined astype: objectwithadditionalProperties: { type: object }.microsoft.graph.security.detectionAction.responseActions[]microsoft.graph.security.responseAction.microsoft.graph.security.responseActionis an emptytype: objectwithadditionalProperties: { type: object }.The generated beta Security module fails C# compilation with errors such as:
Affected generated models include:
MicrosoftGraphSecurityCopilotPromptMicrosoftGraphSecurityDetectionActionRequired OpenAPI correction
Update these schemas to use concrete, generator-supported types. If these values are intentionally arbitrary JSON, model them using the supported free-form object representation rather than an object whose values are themselves untyped objects. The exact schema should reflect the API contract for:
Temporary SDK workaround
PR #3701 removes only these two properties from AutoREST's in-memory OpenAPI document using directives in
src/Security/Security.md:microsoft.graph.security.securityCopilot.prompt.inputsmicrosoft.graph.security.detectionAction.responseActionsThis preserves the associated endpoints and other model properties while allowing beta Security generation and compilation to complete.
Completion criteria
src/Security/Security.md.Related: #3701