Gets the result of a scan operation initiated by the InitiateScan action.
GET https://management.azure.com/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/{operationId}?api-version=2026-04-01-preview
With optional parameters:
GET https://management.azure.com/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/{operationId}?api-version=2026-04-01-preview&databaseName={databaseName}
URI Parameters
| Name |
In |
Required |
Type |
Description |
|
operationId
|
path |
True
|
string
|
|
|
resourceId
|
path |
True
|
string
|
|
|
api-version
|
query |
True
|
string
minLength: 1
|
The API version to use for this operation.
|
|
databaseName
|
query |
|
string
|
|
Responses
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name |
Description |
|
user_impersonation
|
impersonate your user account
|
Examples
Get scan operation result on a resource (using databaseName parameter) - Sql Managed Instance
Sample request
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/managedInstances/myManagedInstance/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555?api-version=2026-04-01-preview&databaseName=master
package armsecurity_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)
// Generated from example definition: 2026-04-01-preview/sqlVulnerabilityAssessmentsScanOperations/ServerLevel_SqlManagedInstanceScans_GetScanOperationResult.json
func ExampleSQLVulnerabilityAssessmentScansClient_GetScanOperationResult_getScanOperationResultOnAResourceUsingDatabaseNameParameterSqlManagedInstance() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsecurity.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSQLVulnerabilityAssessmentScansClient().GetScanOperationResult(ctx, "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/managedInstances/myManagedInstance", "11111111-2222-3333-4444-555555555555", &armsecurity.SQLVulnerabilityAssessmentScansClientGetScanOperationResultOptions{
DatabaseName: to.Ptr("master")})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armsecurity.SQLVulnerabilityAssessmentScansClientGetScanOperationResultResponse{
// SQLVulnerabilityAssessmentScanOperationResult: armsecurity.SQLVulnerabilityAssessmentScanOperationResult{
// Name: to.Ptr("11111111-2222-3333-4444-555555555555"),
// Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/scans/scanOperationResults"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/managedInstances/myManagedInstance/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555"),
// Properties: &armsecurity.SQLVulnerabilityAssessmentScanOperationResultProperties{
// OperationID: to.Ptr("11111111-2222-3333-4444-555555555555"),
// ScanStatus: to.Ptr(armsecurity.ScanOperationStatusPassed),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SecurityCenter } = require("@azure/arm-security");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to gets the result of a scan operation initiated by the InitiateScan action.
*
* @summary gets the result of a scan operation initiated by the InitiateScan action.
* x-ms-original-file: 2026-04-01-preview/sqlVulnerabilityAssessmentsScanOperations/ServerLevel_SqlManagedInstanceScans_GetScanOperationResult.json
*/
async function getScanOperationResultOnAResourceUsingDatabaseNameParameterSqlManagedInstance() {
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential);
const result = await client.sqlVulnerabilityAssessmentScans.getScanOperationResult(
"subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/managedInstances/myManagedInstance",
"11111111-2222-3333-4444-555555555555",
{ databaseName: "master" },
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"name": "11111111-2222-3333-4444-555555555555",
"type": "Microsoft.Security/sqlVulnerabilityAssessments/scans/scanOperationResults",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/managedInstances/myManagedInstance/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555",
"properties": {
"operationId": "11111111-2222-3333-4444-555555555555",
"scanStatus": "Passed"
}
}
Get scan operation result on a resource (using databaseName parameter) - Sql Server
Sample request
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555?api-version=2026-04-01-preview&databaseName=master
package armsecurity_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)
// Generated from example definition: 2026-04-01-preview/sqlVulnerabilityAssessmentsScanOperations/ServerLevel_SqlServerScans_GetScanOperationResult.json
func ExampleSQLVulnerabilityAssessmentScansClient_GetScanOperationResult_getScanOperationResultOnAResourceUsingDatabaseNameParameterSqlServer() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsecurity.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSQLVulnerabilityAssessmentScansClient().GetScanOperationResult(ctx, "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer", "11111111-2222-3333-4444-555555555555", &armsecurity.SQLVulnerabilityAssessmentScansClientGetScanOperationResultOptions{
DatabaseName: to.Ptr("master")})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armsecurity.SQLVulnerabilityAssessmentScansClientGetScanOperationResultResponse{
// SQLVulnerabilityAssessmentScanOperationResult: armsecurity.SQLVulnerabilityAssessmentScanOperationResult{
// Name: to.Ptr("11111111-2222-3333-4444-555555555555"),
// Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/scans/scanOperationResults"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555"),
// Properties: &armsecurity.SQLVulnerabilityAssessmentScanOperationResultProperties{
// OperationID: to.Ptr("11111111-2222-3333-4444-555555555555"),
// ScanStatus: to.Ptr(armsecurity.ScanOperationStatusPassed),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SecurityCenter } = require("@azure/arm-security");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to gets the result of a scan operation initiated by the InitiateScan action.
*
* @summary gets the result of a scan operation initiated by the InitiateScan action.
* x-ms-original-file: 2026-04-01-preview/sqlVulnerabilityAssessmentsScanOperations/ServerLevel_SqlServerScans_GetScanOperationResult.json
*/
async function getScanOperationResultOnAResourceUsingDatabaseNameParameterSqlServer() {
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential);
const result = await client.sqlVulnerabilityAssessmentScans.getScanOperationResult(
"subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer",
"11111111-2222-3333-4444-555555555555",
{ databaseName: "master" },
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"name": "11111111-2222-3333-4444-555555555555",
"type": "Microsoft.Security/sqlVulnerabilityAssessments/scans/scanOperationResults",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555",
"properties": {
"operationId": "11111111-2222-3333-4444-555555555555",
"scanStatus": "Passed"
}
}
Get scan operation result on a resource (using databaseName parameter) - Synapse
Sample request
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Synapse/workspaces/myWorkspace/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555?api-version=2026-04-01-preview&databaseName=master
package armsecurity_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)
// Generated from example definition: 2026-04-01-preview/sqlVulnerabilityAssessmentsScanOperations/ServerLevel_SynapseScans_GetScanOperationResult.json
func ExampleSQLVulnerabilityAssessmentScansClient_GetScanOperationResult_getScanOperationResultOnAResourceUsingDatabaseNameParameterSynapse() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsecurity.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSQLVulnerabilityAssessmentScansClient().GetScanOperationResult(ctx, "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Synapse/workspaces/myWorkspace", "11111111-2222-3333-4444-555555555555", &armsecurity.SQLVulnerabilityAssessmentScansClientGetScanOperationResultOptions{
DatabaseName: to.Ptr("master")})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armsecurity.SQLVulnerabilityAssessmentScansClientGetScanOperationResultResponse{
// SQLVulnerabilityAssessmentScanOperationResult: armsecurity.SQLVulnerabilityAssessmentScanOperationResult{
// Name: to.Ptr("11111111-2222-3333-4444-555555555555"),
// Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/scans/scanOperationResults"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Synapse/workspaces/myWorkspace/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555"),
// Properties: &armsecurity.SQLVulnerabilityAssessmentScanOperationResultProperties{
// OperationID: to.Ptr("11111111-2222-3333-4444-555555555555"),
// ScanStatus: to.Ptr(armsecurity.ScanOperationStatusPassed),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SecurityCenter } = require("@azure/arm-security");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to gets the result of a scan operation initiated by the InitiateScan action.
*
* @summary gets the result of a scan operation initiated by the InitiateScan action.
* x-ms-original-file: 2026-04-01-preview/sqlVulnerabilityAssessmentsScanOperations/ServerLevel_SynapseScans_GetScanOperationResult.json
*/
async function getScanOperationResultOnAResourceUsingDatabaseNameParameterSynapse() {
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential);
const result = await client.sqlVulnerabilityAssessmentScans.getScanOperationResult(
"subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Synapse/workspaces/myWorkspace",
"11111111-2222-3333-4444-555555555555",
{ databaseName: "master" },
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"name": "11111111-2222-3333-4444-555555555555",
"type": "Microsoft.Security/sqlVulnerabilityAssessments/scans/scanOperationResults",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Synapse/workspaces/myWorkspace/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555",
"properties": {
"operationId": "11111111-2222-3333-4444-555555555555",
"scanStatus": "Passed"
}
}
Get scan operation result on a resource - Sql Managed Instance
Sample request
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/managedInstances/myManagedInstance/databases/db/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555?api-version=2026-04-01-preview
package armsecurity_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)
// Generated from example definition: 2026-04-01-preview/sqlVulnerabilityAssessmentsScanOperations/SqlManagedInstanceScans_GetScanOperationResult.json
func ExampleSQLVulnerabilityAssessmentScansClient_GetScanOperationResult_getScanOperationResultOnAResourceSqlManagedInstance() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsecurity.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSQLVulnerabilityAssessmentScansClient().GetScanOperationResult(ctx, "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/managedInstances/myManagedInstance/databases/db", "11111111-2222-3333-4444-555555555555", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armsecurity.SQLVulnerabilityAssessmentScansClientGetScanOperationResultResponse{
// SQLVulnerabilityAssessmentScanOperationResult: armsecurity.SQLVulnerabilityAssessmentScanOperationResult{
// Name: to.Ptr("11111111-2222-3333-4444-555555555555"),
// Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/scans/scanOperationResults"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/managedInstances/myManagedInstance/databases/db/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555"),
// Properties: &armsecurity.SQLVulnerabilityAssessmentScanOperationResultProperties{
// OperationID: to.Ptr("11111111-2222-3333-4444-555555555555"),
// ScanStatus: to.Ptr(armsecurity.ScanOperationStatusPassed),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SecurityCenter } = require("@azure/arm-security");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to gets the result of a scan operation initiated by the InitiateScan action.
*
* @summary gets the result of a scan operation initiated by the InitiateScan action.
* x-ms-original-file: 2026-04-01-preview/sqlVulnerabilityAssessmentsScanOperations/SqlManagedInstanceScans_GetScanOperationResult.json
*/
async function getScanOperationResultOnAResourceSqlManagedInstance() {
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential);
const result = await client.sqlVulnerabilityAssessmentScans.getScanOperationResult(
"subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/managedInstances/myManagedInstance/databases/db",
"11111111-2222-3333-4444-555555555555",
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"name": "11111111-2222-3333-4444-555555555555",
"type": "Microsoft.Security/sqlVulnerabilityAssessments/scans/scanOperationResults",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/managedInstances/myManagedInstance/databases/db/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555",
"properties": {
"operationId": "11111111-2222-3333-4444-555555555555",
"scanStatus": "Passed"
}
}
Get scan operation result on a resource - Sql Server
Sample request
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer/databases/db/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555?api-version=2026-04-01-preview
package armsecurity_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)
// Generated from example definition: 2026-04-01-preview/sqlVulnerabilityAssessmentsScanOperations/SqlServerScans_GetScanOperationResult.json
func ExampleSQLVulnerabilityAssessmentScansClient_GetScanOperationResult_getScanOperationResultOnAResourceSqlServer() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsecurity.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSQLVulnerabilityAssessmentScansClient().GetScanOperationResult(ctx, "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer/databases/db", "11111111-2222-3333-4444-555555555555", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armsecurity.SQLVulnerabilityAssessmentScansClientGetScanOperationResultResponse{
// SQLVulnerabilityAssessmentScanOperationResult: armsecurity.SQLVulnerabilityAssessmentScanOperationResult{
// Name: to.Ptr("11111111-2222-3333-4444-555555555555"),
// Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/scans/scanOperationResults"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer/databases/db/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555"),
// Properties: &armsecurity.SQLVulnerabilityAssessmentScanOperationResultProperties{
// OperationID: to.Ptr("11111111-2222-3333-4444-555555555555"),
// ScanStatus: to.Ptr(armsecurity.ScanOperationStatusPassed),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SecurityCenter } = require("@azure/arm-security");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to gets the result of a scan operation initiated by the InitiateScan action.
*
* @summary gets the result of a scan operation initiated by the InitiateScan action.
* x-ms-original-file: 2026-04-01-preview/sqlVulnerabilityAssessmentsScanOperations/SqlServerScans_GetScanOperationResult.json
*/
async function getScanOperationResultOnAResourceSqlServer() {
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential);
const result = await client.sqlVulnerabilityAssessmentScans.getScanOperationResult(
"subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer/databases/db",
"11111111-2222-3333-4444-555555555555",
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"name": "11111111-2222-3333-4444-555555555555",
"type": "Microsoft.Security/sqlVulnerabilityAssessments/scans/scanOperationResults",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Sql/servers/myServer/databases/db/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555",
"properties": {
"operationId": "11111111-2222-3333-4444-555555555555",
"scanStatus": "Passed"
}
}
Get scan operation result on a resource - Synapse
Sample request
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Synapse/workspaces/myWorkspace/sqlPools/mySqlPool/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555?api-version=2026-04-01-preview
package armsecurity_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)
// Generated from example definition: 2026-04-01-preview/sqlVulnerabilityAssessmentsScanOperations/SynapseScans_GetScanOperationResult.json
func ExampleSQLVulnerabilityAssessmentScansClient_GetScanOperationResult_getScanOperationResultOnAResourceSynapse() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsecurity.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSQLVulnerabilityAssessmentScansClient().GetScanOperationResult(ctx, "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Synapse/workspaces/myWorkspace/sqlPools/mySqlPool", "11111111-2222-3333-4444-555555555555", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armsecurity.SQLVulnerabilityAssessmentScansClientGetScanOperationResultResponse{
// SQLVulnerabilityAssessmentScanOperationResult: armsecurity.SQLVulnerabilityAssessmentScanOperationResult{
// Name: to.Ptr("11111111-2222-3333-4444-555555555555"),
// Type: to.Ptr("Microsoft.Security/sqlVulnerabilityAssessments/scans/scanOperationResults"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Synapse/workspaces/myWorkspace/sqlPools/mySqlPool/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555"),
// Properties: &armsecurity.SQLVulnerabilityAssessmentScanOperationResultProperties{
// OperationID: to.Ptr("11111111-2222-3333-4444-555555555555"),
// ScanStatus: to.Ptr(armsecurity.ScanOperationStatusPassed),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SecurityCenter } = require("@azure/arm-security");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to gets the result of a scan operation initiated by the InitiateScan action.
*
* @summary gets the result of a scan operation initiated by the InitiateScan action.
* x-ms-original-file: 2026-04-01-preview/sqlVulnerabilityAssessmentsScanOperations/SynapseScans_GetScanOperationResult.json
*/
async function getScanOperationResultOnAResourceSynapse() {
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential);
const result = await client.sqlVulnerabilityAssessmentScans.getScanOperationResult(
"subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Synapse/workspaces/myWorkspace/sqlPools/mySqlPool",
"11111111-2222-3333-4444-555555555555",
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"name": "11111111-2222-3333-4444-555555555555",
"type": "Microsoft.Security/sqlVulnerabilityAssessments/scans/scanOperationResults",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.Synapse/workspaces/myWorkspace/sqlPools/mySqlPool/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scanOperationResults/11111111-2222-3333-4444-555555555555",
"properties": {
"operationId": "11111111-2222-3333-4444-555555555555",
"scanStatus": "Passed"
}
}
Definitions
Common.CloudError
Object
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
| Name |
Type |
Description |
|
error.additionalInfo
|
ErrorAdditionalInfo[]
|
The error additional info.
|
|
error.code
|
string
|
The error code.
|
|
error.details
|
Common.CloudErrorBody[]
|
The error details.
|
|
error.message
|
string
|
The error message.
|
|
error.target
|
string
|
The error target.
|
Common.CloudErrorBody
Object
The error detail.
| Name |
Type |
Description |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
The error additional info.
|
|
code
|
string
|
The error code.
|
|
details
|
Common.CloudErrorBody[]
|
The error details.
|
|
message
|
string
|
The error message.
|
|
target
|
string
|
The error target.
|
createdByType
Enumeration
The type of identity that created the resource.
| Value |
Description |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
ErrorAdditionalInfo
Object
The resource management error additional info.
| Name |
Type |
Description |
|
info
|
object
|
The additional info.
|
|
type
|
string
|
The additional info type.
|
ScanOperationStatus
Enumeration
The scan operation status.
| Value |
Description |
|
Passed
|
The scan completed successfully with no vulnerabilities found.
|
|
Failed
|
The scan completed but found vulnerabilities.
|
|
FailedToRun
|
The scan failed to execute.
|
|
InProgress
|
The scan is currently running.
|
SqlVulnerabilityAssessmentScanOperationResult
Object
Represents the result of a SQL Vulnerability Assessment scan operation, wrapped in the ARM resource envelope.
| Name |
Type |
Description |
|
id
|
string
(arm-id)
|
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
The name of the resource
|
|
properties
|
SqlVulnerabilityAssessmentScanOperationResultProperties
|
Represents the properties of a SQL Vulnerability Assessment scan operation result.
|
|
systemData
|
systemData
|
Azure Resource Manager metadata containing createdBy and modifiedBy information.
|
|
type
|
string
|
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
|
SqlVulnerabilityAssessmentScanOperationResultProperties
Object
Represents the properties of a SQL Vulnerability Assessment scan operation result.
| Name |
Type |
Description |
|
operationId
|
string
|
Gets or sets the operation id.
|
|
scanStatus
|
ScanOperationStatus
|
The scan operation status.
|
systemData
Object
Metadata pertaining to creation and last modification of the resource.
| Name |
Type |
Description |
|
createdAt
|
string
(date-time)
|
The timestamp of resource creation (UTC).
|
|
createdBy
|
string
|
The identity that created the resource.
|
|
createdByType
|
createdByType
|
The type of identity that created the resource.
|
|
lastModifiedAt
|
string
(date-time)
|
The timestamp of resource last modification (UTC)
|
|
lastModifiedBy
|
string
|
The identity that last modified the resource.
|
|
lastModifiedByType
|
createdByType
|
The type of identity that last modified the resource.
|