Account Management
List available organizational folders
NoteYou must have Administrator role permissions to run this command.
Use the Folders query to retrieve the hierarchy of organizational units within your environment. This is useful for identifying the ParentScopeId required when adding or moving accounts into specific logical groups (e.g., AWS, Azure, or GCP roots).
query {
Folders{
nodes {Id, Name, ParentScopeId}
}
}Sample response
{
"data": {
"Folders": {
"nodes": [
{
"Id": "awsRoot",
"Name": "AWS",
"ParentScopeId": "awsRoot"
},
{
"Id": "azureRoot",
"Name": "Azure",
"ParentScopeId": "awsRoot"
},
{
"Id": "gcpRoot",
"Name": "GCP",
"ParentScopeId": "awsRoot"
}
]
}
}
}List accounts
NoteYou must have Administrator role permissions to run this command.
Use the Accounts query to retrieve a high-level list of all cloud environments connected to Tenable. This query returns common metadata such as Name, Status, and SyncTime.
To retrieve provider-specific fields, use the AWS, Azure, or GCP examples below, which use GraphQL fragments, such as ... on AwsAccount, to expose extended attributes.
{
Accounts {
nodes {
Name
CreationTime
Id
__typename
Issues
CreationTime
ParentScopeId
Status
SyncTime
}
}
}
Sample response
{
"data": {
"Accounts": {
"nodes": [
{
"Name": "ExampleProject",
"CreationTime": "2026-03-29T00:37:27.864Z",
"Id": "123456789012",
"__typename": "GcpProject",
"Issues": [],
"ParentScopeId": "gcpRoot",
"Status": "Connected",
"SyncTime": "2026-03-29T08:09:15.358Z"
}
]
}
}
}
List all accounts with onboarding issues
NoteYou must have Administrator role permissions to run this command.
Use the Statuses filter with the ConnectedWithIssues value to identify cloud environments that require attention. This query is useful for building health-check reports or dashboards to quickly identify accounts where discovery or scanning might be partially obstructed.
{
Accounts(filter: {Statuses: ConnectedWithIssues}) {
nodes {
Name
CreationTime
Id
__typename
Issues
CreationTime
ParentScopeId
Status
SyncTime
}
}
}
Sample response
{
"data": {
"Accounts": {
"nodes": [
{
"Name": "Org1Account2",
"CreationTime": "2026-03-29T00:36:01.427Z",
"Id": "444455556666",
"__typename": "AwsAccount",
"Issues": [
"AwsAccountDataAnalysisRolePolicyDocumentMismatch"
],
"ParentScopeId": "awsRoot",
"Status": "ConnectedWithIssues",
"SyncTime": "2026-03-29T08:05:35.917Z"
}
]
}
}
}
List AWS accounts
NoteYou must have Administrator role permissions to run this command.
To retrieve AWS-specific metadata, such as active regions, Audit status, and CloudTrail configurations, apply the TenantTypes: AWS filter. This query uses the ... on AwsAccount fragment to expose attributes that are unique to AWS environments, which is essential for verifying the role ARN and region coverage.
{
Accounts(filter: {TenantTypes: AWS}) {
nodes {
Name
CreationTime
Id
__typename
Issues
CreationTime
ParentScopeId
Status
SyncTime
... on AwsAccount {
ActiveRegions
Audit
RoleArn
Trails {
Arn
EventCategories
}
}
}
}
}
Sample response
{
"data": {
"Accounts": {
"nodes": [
{
"Name": "Org7Account1",
"CreationTime": "2026-03-29T00:35:54.578Z",
"Id": "444455556666",
"__typename": "AwsAccount",
"Issues": [],
"ParentScopeId": "awsRoot",
"Status": "Connected",
"SyncTime": "2026-03-29T08:05:35.872Z",
"ActiveRegions": null,
"Audit": false,
"RoleArn": "arn:aws:iam::123456789012:role/RoleQA",
"Trails": [
{
"Arn": "arn:aws:cloudtrail:us-east-2:111122223333:trail/organization-trail",
"EventCategories": [
"DynamoDb",
"Lambda",
"Management",
"S3"
]
}
]
}
]
}
}
}
List Azure accounts
NoteYou must have Administrator role permissions to run this command.
Apply the TenantTypes: Azure filter and use the ... on AzureSubscription fragment to view Azure-specific properties. This query reports the health of the service principal, showing the role definitions that are assigned and the ones still missing for a successful connection to Tenable.
{
Accounts(filter: {TenantTypes: Azure}) {
nodes {
Name
CreationTime
Id
__typename
Issues
CreationTime
ParentScopeId
Status
SyncTime
... on AzureSubscription {
AzureAdTenantId
ServicePrincipalAssignedRoleDefinitionNames
ServicePrincipalMissingAssignedRoleDefinitionNames
}
}
}
}
Sample response
{
"data": {
"Accounts": {
"nodes": [
{
"Name": "Org1Subscription1",
"CreationTime": "2026-03-29T00:36:54.273Z",
"Id": "17bca271-ba18-4c7e-8879-5e6115e6b228",
"__typename": "AzureSubscription",
"Issues": [],
"ParentScopeId": "azureRoot",
"Status": "Connected",
"SyncTime": "2026-03-29T08:05:48.625Z",
"AzureAdTenantId": "Ermetic.Sil.CenterCommon.AzureTenantModel",
"ServicePrincipalAssignedRoleDefinitionNames": [
"Owner",
"Disk Snapshot Contributor",
"Key Vault Secrets User",
"Key Vault Crypto User",
"Key Vault Reader"
],
"ServicePrincipalMissingAssignedRoleDefinitionNames": []
}
]
}
}
}
List GCP accounts
NoteYou must have Administrator role permissions to run this command.
Use the TenantTypes: GCP filter and the ... on GcpProject fragment to retrieve details specific to Google Cloud. This is particularly useful for verifying the PubSubSubscriptionId and identifying any missing permissions assigned to the Service Account used for project discovery.
{
Accounts(filter: {TenantTypes: GCP}) {
nodes {
Name
CreationTime
Id
__typename
Issues
CreationTime
ParentScopeId
Status
SyncTime
... on GcpProject {
GoogleWorkspaceId
ProjectId
PubSubSubscriptionId
ServiceAccountAssignedRoleNames
ServiceAccountMissingRoleNames
}
}
}
}
Sample response
{
"data": {
"Accounts": {
"nodes": [
{
"Name": "ExampleProject",
"CreationTime": "2026-03-29T00:37:27.864Z",
"Id": "123456789012",
"__typename": "GcpProject",
"Issues": [],
"ParentScopeId": "gcpRoot",
"Status": "Connected",
"SyncTime": "2026-03-29T08:09:15.358Z",
"GoogleWorkspaceId": "C0bwmv63q",
"ProjectId": "example-project-2",
"PubSubSubscriptionId": null,
"ServiceAccountAssignedRoleNames": [
"Tenable Data Scanning",
"Tenable Workload Scanning",
"App Engine Viewer",
"Artifact Registry Reader",
"BigQuery Data Owner",
"Security Reviewer",
"Service Account Admin",
"Organization Policy Viewer",
"Organization Viewer"
],
"ServiceAccountMissingRoleNames": []
}
]
}
}
}
List accounts (deprecated)
The following queries are currently deprecated. While they remain functional for backward compatibility, it is recommended to migrate to the unified List accounts query using TenantTypes filters for all new integrations and scripts.
List AWS accounts (deprecated)
NoteYou must have Administrator role permissions to run this command.
This legacy query retrieves data directly from the AwsAccounts object. Use this to identify AWS environments with specific health statuses, such as AccessDenied or RoleAssumeFailure, to troubleshoot connectivity at the account level.
{
AwsAccounts(
filter: {
Statuses: [
AccessDenied,
RegionValidationFailure,
RoleAssumeFailure,
RoleReadOnlyPolicyDocumentMismatch,
ValidWithIssues
]
}) {
nodes {
Id
Name
RoleArn
Status
ActiveRegions
Status
__typename
}
}
}Sample response
{
"data": {
"AwsAccounts": {
"nodes": [
{
"Id": "123456789012",
"Name": "Org1Account2",
"RoleArn": "arn:aws:iam::444455556666:role/RoleQA",
"Status": "ValidWithIssues",
"ActiveRegions": null,
"__typename": "LegacyAwsAccount"
}
]
}
}
}
List Azure accounts (deprecated)
NoteYou must have Administrator role permissions to run this command.
This legacy query retrieves data from the AzureSubscriptions object. It provides visibility into subscription-level metadata, including the AzureAdTenantId and the specific role definitions assigned to the service principal.
{
AzureSubscriptions {
nodes {
Name
CreationTime
Id
__typename
Issues
CreationTime
ParentScopeId
Status
SyncTime
AzureAdTenantId
ServicePrincipalAssignedRoleDefinitionNames
ServicePrincipalMissingAssignedRoleDefinitionNames
}
}
}Sample response
{
"data": {
"AzureSubscriptions": {
"nodes": [
{
"Name": "Org2Subscription2",
"CreationTime": "2026-03-29T00:36:59.396Z",
"Id": "e5eaa145-1d6c-4efb-8a30-4d5b13af1107",
"__typename": "LegacyAzureSubscription",
"Issues": [],
"ParentScopeId": "azureRoot",
"Status": "Valid",
"SyncTime": "2026-03-29T08:05:42.875Z",
"AzureAdTenantId": "CenterCommon.LegacyAzureTenantModel",
"ServicePrincipalAssignedRoleDefinitionNames": [
"Owner",
"Disk Snapshot Contributor",
"Key Vault Secrets User",
"Key Vault Crypto User",
"Key Vault Reader"
],
"ServicePrincipalMissingAssignedRoleDefinitionNames": []
}
]
}
}
}
List GCP accounts (deprecated)
NoteYou must have Administrator role permissions to run this command.
This legacy query retrieves data from the GcpProjects object. Use it to verify project-specific configurations, such as the GoogleWorkspaceId or the Service Account roles required for Tenable to discover resources.
{
GcpProjects {
nodes {
Name
CreationTime
Id
__typename
Issues
CreationTime
ParentScopeId
Status
SyncTime
GoogleWorkspaceId
ProjectId
PubSubSubscriptionId
ServiceAccountAssignedRoleNames
ServiceAccountMissingRoleNames
}
}
}
Sample response
{
"data": {
"GcpProjects": {
"nodes": [
{
"Name": "ExampleProject",
"CreationTime": "2026-03-29T00:37:27.864Z",
"Id": "123456789012",
"__typename": "LegacyGcpProject",
"Issues": [],
"ParentScopeId": "gcpRoot",
"Status": "Valid",
"SyncTime": "2026-03-29T08:09:15.358Z",
"GoogleWorkspaceId": "C0bwmv63q",
"ProjectId": "example-project-1",
"PubSubSubscriptionId": null,
"ServiceAccountAssignedRoleNames": [
"Tenable Data Scanning",
"Tenable Workload Scanning",
"App Engine Viewer",
"Artifact Registry Reader",
"BigQuery Data Owner",
"BigQuery Metadata Viewer",
"Cloud Asset Viewer",
"Compute Network Viewer",
"Compute Viewer",
"Kubernetes Engine Viewer",
"Security Admin",
"Security Reviewer",
"Service Account Admin",
"Organization Policy Viewer",
"Organization Viewer"
],
"ServiceAccountMissingRoleNames": []
}
]
}
}
}
Add a new AWS account
NoteYou must have Administrator role permissions to run this command.
# TODO: Replace placeholders with the account details
mutation {
CreateAwsAccount(
input: {
ParentFolderId: "awsRoot",
Name: "<ACCOUNT_NAME>",
Id: "<ACCOUNT_ID>",
RoleArn: "<ROLE_ARN>",
TrailArns: ["<CLOUDTRAIL_ARN>"]}
) {
Account {
Id
Name
RoleArn
ActiveRegions
Trails {
Arn
EventCategories
}
}
}
}Remove an AWS account
mutation {
DeleteAwsAccount(input: { Id:"<ACCOUNT_ID>" }) {
Deleted
}
}Add a new GCP account
NoteYou must have Administrator role permissions to run this command.
mutation {
CreateGcpProject(
input: {
GoogleWorkspaceId: "<WORKSPACE_ID>",
ParentFolderId: "gcpRoot",
Id: "<PROJECT_ID>"}
) {
Project {
Id
ServiceAccountAssignedRoleNames
}
}
}Updated 20 days ago
