Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The sourcecontrols resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.SecurityInsights/sourcecontrols resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.SecurityInsights/sourcecontrols@2025-09-01' = {
scope: resourceSymbolicName or scope
etag: 'string'
name: 'string'
properties: {
contentTypes: [
'string'
]
description: 'string'
displayName: 'string'
repository: {
branch: 'string'
displayUrl: 'string'
url: 'string'
}
repositoryAccess: {
clientId: 'string'
code: 'string'
installationId: 'string'
kind: 'string'
state: 'string'
token: 'string'
}
repositoryResourceInfo: {
webhook: {
rotateWebhookSecret: bool
}
}
repoType: 'string'
servicePrincipal: {
credentialsExpireOn: 'string'
}
}
}
Property Values
Microsoft.SecurityInsights/sourcecontrols
| Name | Description | Value |
|---|---|---|
| etag | Etag of the azure resource | string |
| name | The resource name | string (required) |
| properties | source control properties | SourceControlProperties (required) |
| scope | Use when creating a resource at a scope that is different than the deployment scope. | Set this property to the symbolic name of a resource to apply the extension resource. |
Repository
| Name | Description | Value |
|---|---|---|
| branch | Branch name of repository. | string (required) |
| displayUrl | Display url of repository. | string |
| url | Url of repository. | string (required) |
RepositoryAccess
| Name | Description | Value |
|---|---|---|
| clientId | OAuth ClientId. Required when kind is OAuth |
string |
| code | OAuth Code. Required when kind is OAuth |
string Constraints: Sensitive value. Pass in as a secure parameter. |
| installationId | Application installation ID. Required when kind is App. Supported by GitHub only. |
string |
| kind | The kind of repository access credentials | 'App' 'OAuth' 'PAT' (required) |
| state | OAuth State. Required when kind is OAuth |
string Constraints: Sensitive value. Pass in as a secure parameter. |
| token | Personal Access Token. Required when kind is PAT |
string Constraints: Sensitive value. Pass in as a secure parameter. |
RepositoryResourceInfo
| Name | Description | Value |
|---|---|---|
| webhook | The webhook object created for the source-control. | Webhook |
ServicePrincipal
| Name | Description | Value |
|---|---|---|
| credentialsExpireOn | Expiration time of service principal credentials. | string |
SourceControlProperties
| Name | Description | Value |
|---|---|---|
| contentTypes | Array of source control content types. | String array containing any of: 'AnalyticsRule' 'AutomationRule' 'HuntingQuery' 'Parser' 'Playbook' 'Workbook' (required) |
| description | A description of the source control | string |
| displayName | The display name of the source control | string (required) |
| repository | Repository metadata. | Repository (required) |
| repositoryAccess | Repository access credentials. This is write-only object and it never returns back to a user. | RepositoryAccess |
| repositoryResourceInfo | Information regarding the resources created in user's repository. | RepositoryResourceInfo |
| repoType | The repository type of the source control | 'AzureDevOps' 'Github' (required) |
| servicePrincipal | Service principal metadata. | ServicePrincipal |
Webhook
| Name | Description | Value |
|---|---|---|
| rotateWebhookSecret | A flag to instruct the backend service to rotate webhook secret. | bool |
ARM template resource definition
The sourcecontrols resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Usage Examples
Resource format
To create a Microsoft.SecurityInsights/sourcecontrols resource, add the following JSON to your template.
{
"type": "Microsoft.SecurityInsights/sourcecontrols",
"apiVersion": "2025-09-01",
"name": "string",
"etag": "string",
"properties": {
"contentTypes": [ "string" ],
"description": "string",
"displayName": "string",
"repository": {
"branch": "string",
"displayUrl": "string",
"url": "string"
},
"repositoryAccess": {
"clientId": "string",
"code": "string",
"installationId": "string",
"kind": "string",
"state": "string",
"token": "string"
},
"repositoryResourceInfo": {
"webhook": {
"rotateWebhookSecret": "bool"
}
},
"repoType": "string",
"servicePrincipal": {
"credentialsExpireOn": "string"
}
}
}
Property Values
Microsoft.SecurityInsights/sourcecontrols
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2025-09-01' |
| etag | Etag of the azure resource | string |
| name | The resource name | string (required) |
| properties | source control properties | SourceControlProperties (required) |
| type | The resource type | 'Microsoft.SecurityInsights/sourcecontrols' |
Repository
| Name | Description | Value |
|---|---|---|
| branch | Branch name of repository. | string (required) |
| displayUrl | Display url of repository. | string |
| url | Url of repository. | string (required) |
RepositoryAccess
| Name | Description | Value |
|---|---|---|
| clientId | OAuth ClientId. Required when kind is OAuth |
string |
| code | OAuth Code. Required when kind is OAuth |
string Constraints: Sensitive value. Pass in as a secure parameter. |
| installationId | Application installation ID. Required when kind is App. Supported by GitHub only. |
string |
| kind | The kind of repository access credentials | 'App' 'OAuth' 'PAT' (required) |
| state | OAuth State. Required when kind is OAuth |
string Constraints: Sensitive value. Pass in as a secure parameter. |
| token | Personal Access Token. Required when kind is PAT |
string Constraints: Sensitive value. Pass in as a secure parameter. |
RepositoryResourceInfo
| Name | Description | Value |
|---|---|---|
| webhook | The webhook object created for the source-control. | Webhook |
ServicePrincipal
| Name | Description | Value |
|---|---|---|
| credentialsExpireOn | Expiration time of service principal credentials. | string |
SourceControlProperties
| Name | Description | Value |
|---|---|---|
| contentTypes | Array of source control content types. | String array containing any of: 'AnalyticsRule' 'AutomationRule' 'HuntingQuery' 'Parser' 'Playbook' 'Workbook' (required) |
| description | A description of the source control | string |
| displayName | The display name of the source control | string (required) |
| repository | Repository metadata. | Repository (required) |
| repositoryAccess | Repository access credentials. This is write-only object and it never returns back to a user. | RepositoryAccess |
| repositoryResourceInfo | Information regarding the resources created in user's repository. | RepositoryResourceInfo |
| repoType | The repository type of the source control | 'AzureDevOps' 'Github' (required) |
| servicePrincipal | Service principal metadata. | ServicePrincipal |
Webhook
| Name | Description | Value |
|---|---|---|
| rotateWebhookSecret | A flag to instruct the backend service to rotate webhook secret. | bool |
Terraform (AzAPI provider) resource definition
The sourcecontrols resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.SecurityInsights/sourcecontrols resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.SecurityInsights/sourcecontrols@2025-09-01"
name = "string"
parent_id = "string"
body = {
etag = "string"
properties = {
contentTypes = [
"string"
]
description = "string"
displayName = "string"
repository = {
branch = "string"
displayUrl = "string"
url = "string"
}
repositoryAccess = {
clientId = "string"
code = "string"
installationId = "string"
kind = "string"
state = "string"
token = "string"
}
repositoryResourceInfo = {
webhook = {
rotateWebhookSecret = bool
}
}
repoType = "string"
servicePrincipal = {
credentialsExpireOn = "string"
}
}
}
}
Property Values
Microsoft.SecurityInsights/sourcecontrols
| Name | Description | Value |
|---|---|---|
| etag | Etag of the azure resource | string |
| name | The resource name | string (required) |
| parent_id | The ID of the resource to apply this extension resource to. | string (required) |
| properties | source control properties | SourceControlProperties (required) |
| type | The resource type | "Microsoft.SecurityInsights/sourcecontrols@2025-09-01" |
Repository
| Name | Description | Value |
|---|---|---|
| branch | Branch name of repository. | string (required) |
| displayUrl | Display url of repository. | string |
| url | Url of repository. | string (required) |
RepositoryAccess
| Name | Description | Value |
|---|---|---|
| clientId | OAuth ClientId. Required when kind is OAuth |
string |
| code | OAuth Code. Required when kind is OAuth |
string Constraints: Sensitive value. Pass in as a secure parameter. |
| installationId | Application installation ID. Required when kind is App. Supported by GitHub only. |
string |
| kind | The kind of repository access credentials | 'App' 'OAuth' 'PAT' (required) |
| state | OAuth State. Required when kind is OAuth |
string Constraints: Sensitive value. Pass in as a secure parameter. |
| token | Personal Access Token. Required when kind is PAT |
string Constraints: Sensitive value. Pass in as a secure parameter. |
RepositoryResourceInfo
| Name | Description | Value |
|---|---|---|
| webhook | The webhook object created for the source-control. | Webhook |
ServicePrincipal
| Name | Description | Value |
|---|---|---|
| credentialsExpireOn | Expiration time of service principal credentials. | string |
SourceControlProperties
| Name | Description | Value |
|---|---|---|
| contentTypes | Array of source control content types. | String array containing any of: 'AnalyticsRule' 'AutomationRule' 'HuntingQuery' 'Parser' 'Playbook' 'Workbook' (required) |
| description | A description of the source control | string |
| displayName | The display name of the source control | string (required) |
| repository | Repository metadata. | Repository (required) |
| repositoryAccess | Repository access credentials. This is write-only object and it never returns back to a user. | RepositoryAccess |
| repositoryResourceInfo | Information regarding the resources created in user's repository. | RepositoryResourceInfo |
| repoType | The repository type of the source control | 'AzureDevOps' 'Github' (required) |
| servicePrincipal | Service principal metadata. | ServicePrincipal |
Webhook
| Name | Description | Value |
|---|---|---|
| rotateWebhookSecret | A flag to instruct the backend service to rotate webhook secret. | bool |