Skip to content

Incomplete output of the command 'az sentinel threat-indicator list' #29833

Open

Description

@winnie008

Describe the bug

We are trying to use an experimental extension: az sentinel threat-indicator list.

There's a parameter --skip-token for large datasets but the output of the extension does not provide the nextLink.
e.g. --top 500 to list the threat indicators in batches of 500 (have 7122 in total).

Is this a bug?It would be helpful to provide an example of:

  1. How to use the az sentinel threat-indicator list extension?
  2. What is the expected output (what does this nextLink look like in the output)?
  3. Check if the extension is working as intended.

Related command

az sentinel threat-indicator list --resource-group $resourceGroupName
--workspace-name $workspaceName --top "1"
--output json

Errors

Output (no nextLink element?):
This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
[
{
"created": "2024-08-28T02:15:01.9277641Z",
"description": "xxx",
"displayName": "xxx",
"etag": ""xxx"",
"externalId": "xxx",
"externalLastUpdatedTimeUtc": "2024-08-28T02:15:01.9277641Z",
"id": "xxx",
"kind": "indicator",
"labels": [
"xxx",
"xxx"
],
"lastUpdatedTimeUtc": "2024-08-28T02:15:01.9281699Z",
"name": "xxx",
"parsedPattern": [
{
"patternTypeKey": "file",
"patternTypeValues": [
{
"value": "xxx",
"valueType": "hashes.'MD5'"
}
]
}
],
"pattern": "[file:hashes.'MD5' = 'xxx']",
"patternType": "xxx",
"resourceGroup": "xxx",
"source": "xxx",
"threatIntelligenceTags": [
"xxx",
"xxx"
],
"type": "Microsoft.SecurityInsights/threatIntelligence/main/indicators",
"validFrom": "2024-08-27T00:00:00+00:00"
}
]

Issue script & Debug output

Output (no nextLink element?):
This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
[
{
"created": "2024-08-28T02:15:01.9277641Z",
"description": "xxx",
"displayName": "xxx",
"etag": ""xxx"",
"externalId": "xxx",
"externalLastUpdatedTimeUtc": "2024-08-28T02:15:01.9277641Z",
"id": "xxx",
"kind": "indicator",
"labels": [
"xxx",
"xxx"
],
"lastUpdatedTimeUtc": "2024-08-28T02:15:01.9281699Z",
"name": "xxx",
"parsedPattern": [
{
"patternTypeKey": "file",
"patternTypeValues": [
{
"value": "xxx",
"valueType": "hashes.'MD5'"
}
]
}
],
"pattern": "[file:hashes.'MD5' = 'xxx']",
"patternType": "xxx",
"resourceGroup": "xxx",
"source": "xxx",
"threatIntelligenceTags": [
"xxx",
"xxx"
],
"type": "Microsoft.SecurityInsights/threatIntelligence/main/indicators",
"validFrom": "2024-08-27T00:00:00+00:00"
}
]

Expected behavior

There's a parameter --skip-token for large datasets and the output of the extension can provide the nextLink.
e.g. --top 500 to list the threat indicators in batches of 500 (have 7122 in total).

It would be helpful to provide an example of:

  1. How to use the az sentinel threat-indicator list extension?
  2. What is the expected output (what does this nextLink look like in the output)?
  3. Check if the extension is working as intended.

Environment Summary

Azure CLI (version 2.37.0 or higher)

Additional context

No response

Activity

  1. added
    bugThis issue requires a change to an existing behavior in the product in order to be resolved.
    on Sep 4, 2024
  2. added
    customer-reportedIssues that are reported by GitHub users external to the Azure organization.
    Azure CLI TeamThe command of the issue is owned by Azure CLI team
    questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
    on Sep 4, 2024
  3. yonzhan commented on Sep 4, 2024

    @yonzhan
    Collaborator

    Thank you for opening this issue, we will look into it.

  4. added this to the Backlog milestone on Sep 4, 2024
  5. removed
    bugThis issue requires a change to an existing behavior in the product in order to be resolved.
    on Sep 4, 2024
  6. winnie008 commented on Sep 9, 2024

    @winnie008
    Author

    Yong Zhang (@yonzhan) Qinkai Wu (@ReaNAiveD) Are there any updates? I appreciate your attention to this matter.

  7. ReaNAiveD commented on Sep 9, 2024

    @ReaNAiveD
    Member

    Hi winnie008 Sorry for the late response.

    The output meets the expectation.

    The command in question was generated using an older version of the aaz codegen tool, which does not support pagination. As a result, the command should output all results without a nextLink.

    Please note that the parameters --top and --skip-token are limited in functionality and can only be used to view the top n results.

  8. winnie008 commented on Sep 9, 2024

    @winnie008
    Author

    Qinkai Wu (@ReaNAiveD) Thanks for your help. May I know the newer version of the aaz codegen tool that can support pagination.

    For the newer version, it would be helpful to provide an example of:

    How to use the az sentinel threat-indicator list extension?
    What is the expected output (what does this nextLink look like in the output)?
    Check if the extension is working as intended.

  9. winnie008 commented on Sep 10, 2024

    @winnie008
    Author

    Qinkai Wu (@ReaNAiveD) Could you please check the query above? Thank you.

  10. ReaNAiveD commented on Sep 10, 2024

    @ReaNAiveD
    Member

    The aaz-dev-tools link: https://github.com/Azure/aaz-dev-tools/
    The current codegen tool could support pagination. https://azure.github.io/aaz-dev-tools/pages/faq/#does-aazdev-support-pagination

    The extension works as expected. You could use the command without --top and skip-token to list all results.

  11. winnie008 commented on Sep 13, 2024

    @winnie008
    Author

    Qinkai Wu (@ReaNAiveD) Thank you for the update. When you referred to aaz-dev-tools, is it related to the Azure CLI version? We are currently using version 2.64.0, and I would like to understand how we can upgrade aaz-dev-tools.

  12. winnie008 commented on Sep 13, 2024

    @winnie008
    Author

    Qinkai Wu (@ReaNAiveD) Thanks for clarifying that the extension is working. I went to try Threat Intelligence Indicators – List API Call and I was able to get the nextLink value, however when I tried to go through each page, the nextLink value produced keeps directing me to the same point. I have attached the nextLink value below for your reference, the skipCount for each link is 0 meaning that the pagination is not going on to the next page? Do you know how I can resolve this issue?

    "nextLink": https://management.azure.com:443/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.OperationalInsights/workspaces/xxx/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators?api-version=2024-03-01&$skipToken=[{\compositeToken\":{\"token\":\"xxx\"}},\"resumeValues\":[\"2024-09-10T07:38:22.9964422Z\"],\"rid\":\"HakeAJwzl3ztJgAAAAAAAA==\",\"skipCount\":0}]"

  13. jsntcy commented on Sep 13, 2024

    @jsntcy
    Member

    Add Ethan Yang (@necusjz) for awareness.

  14. necusjz commented on Sep 18, 2024

    @necusjz
    Member

    winnie008 https://github.com/Azure/aaz-dev-tools is the codebase of aaz-dev-tools and you can also find document within it. currently, it naturally supports pagination after code generation.

  15. winnie008 commented on Sep 19, 2024

    @winnie008
    Author

    Ethan Yang (@necusjz) Thanks for sharing the codebase, I checked it. However, when I attempted to navigate through each page, the nextLink value repeatedly directed me to the same location. I have included the nextLink value below for your reference. The skipCount for each link is 0, I would like to check whether it indicates that the pagination is not advancing to the next page. Could you please share with me a detailed method to solve this issue?

    sample:
    "nextLink": https://management.azure.com:443/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.OperationalInsights/workspaces/xxx/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators?api-version=2024-03-01&$skipToken=[{\compositeToken\":{\"token\":\"xxx\",\"range\":{\"min\":\"\",\"max\":\"FF\"}},\"resumeValues\":[\"2024-09-10T07:38:22.9964422Z\"],\"rid\":\"HakeAJwzl3ztJgAAAAAAAA==\",\"skipCount\":0}]"

    "nextLink": https://management.azure.com:443/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.OperationalInsights/workspaces/xxx/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators?api-version=2024-03-01&skipToken=[{\\\compositeToken\\\":{\\\"token\\\":\\\" xxx","range":{"min":"","max":"FF"}},"resumeValues":["2024-09-10T07:38:22.9964422Z"],"rid":"HakeAJwzl3ztJgAAAAAAAA==","skipCount":0}]#\",\"range\":{\"min\":\"\",\"max\":\"FF\"}},\"resumeValues\":[\"2024-09-10T07:38:22.9964422Z\"],\"rid\":\"HakeAJwzl3ztJgAAAAAAAA==\",\"skipCount\":0}]"

    Also, the Azure CLI version I am using is 2.64.0. May I know whether we need to upgrade aaz-dev-tools and how to update it?

  16. winnie008 commented on Sep 20, 2024

    @winnie008
    Author

    Ethan Yang (@necusjz) Could you please check the query above? Thanks!

  17. winnie008 commented on Sep 24, 2024

    @winnie008
    Author

    Qinkai Wu (@ReaNAiveD) I would like to check the resolution for the issue above as soon as possible, please let me know your suggestions or you need more info from my end. Thank you.

  18. winnie008 commented on Sep 25, 2024

    @winnie008
    Author

    Yu Chen (@jsntcy) May we know if there are any updates? Please advise.

  19. added
    Service AttentionThis issue is responsible by Azure service team.
    and removed
    Azure CLI TeamThe command of the issue is owned by Azure CLI team
    on Feb 27, 2026
  20. microsoft-github-policy-service commented on Feb 27, 2026

    @microsoft-github-policy-service
    Contributor

    Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc Nan Zang (@nazang), mooshc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Auto-AssignAuto assign by botSecurityInsightsService AttentionThis issue is responsible by Azure service team.act-codegen-extensibility-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions