Loading...

Demystifying Azure CLI pagnination

Demystifying Azure CLI pagnination

Introduction  

Pagination in the context of the command line refers to the process of displaying long lists of information or text in a way that makes it more manageable for the user. When you execute a command that generates a large amount of output, such as a directory listing or the contents of a file, it may not all fit on the screen at once. Pagination allows you to view the information one screenful (or page) at a time. 

 

The main role of pagination is to retrieve data from a large table chunk by chunk so that the client does not need to make an API call that has a huge payload. Smaller payload results in less latency. 

 Once the data is on the client side, navigating between pages is generally faster because it doesn't require additional requests to the server. The client can quickly switch between pages without waiting for network communication. 

 

Usage 

Jeremy_Li_0-1713406484483.png

What’s the interface look like when applied pagination 

 

  • --max-items parameter 

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in `--next-token` argument of a subsequent command. 

 

  • --next-tokens parameter 

Token to specify where to start paginating. This is the token value from a previously truncated response. 

 

 

Future Improvements: 

  • Provide options for filtering and sorting the data, allowing users to customize the output to their needs. 
  • Users can navigate through the pages of data using the arrow keys or by typing in a page number. 
  • Provide a summary of the total number of items and the current page number. 

 

 

We love to hear your feedback, please do not hesitate share your thoughts with us via the direct comment here, or email us [email protected].

To report an issue, please create a GitHub issue: https://github.com/Azure/azure-cli/issues/new/choose

Published on:

Learn more
Azure Tools Blog articles
Azure Tools Blog articles

Azure Tools Blog articles

Share post:

Related posts

Azure DevOps Remote MCP Server is generally available

Today, we’re excited to announce the general availability of the Azure DevOps MCP Server 🎉 The Azure DevOps MCP Server gives AI assista...

3 hours ago

How Microsoft Fabric, Azure, and Power BI Are Transforming Analytics

Introduction Data has become one of the most valuable assets for modern organisations. However, collecting data alone is no longer enough—busi...

2 days ago

Top Azure Services Every Dynamics 365 Developer Must Learn

Introduction Microsoft Dynamics 365 has evolved far beyond being just a Customer Relationship Management (CRM) or Enterprise Resource Planning...

4 days ago

Creating AI-Powered Workflows Using Power Automate and Azure AI

Introduction Artificial Intelligence is revolutionising business automation by enabling organisations to build workflows that not only automat...

5 days ago

Azure Developer CLI (azd) July 2026

This is the July round-up for the Azure Developer CLI (azd). Five releases shipped since the last post: 1.27.0, 1.27.1, 1.28.0, 1.28.1, and 1....

5 days ago

Azure vs AWS: Which Cloud Platform Should You Learn in 2026?

Introduction Cloud computing has become the foundation of modern digital transformation. From startups to Fortune 500 companies, organizations...

6 days ago

Building Enterprise Applications with .NET 10 and Azure Cloud

Introduction As businesses continue their digital transformation journey, enterprise applications are expected to be more intelligent, scalabl...

6 days ago

Azure Tops $100 Billion As Microsoft Reports FY26 Q4 Results

On July 29, Microsoft released their FY26 Q4 results. We learned that Microsoft 365 Copilot has 30 million paid seats, but that's still less t...

6 days ago

Azure SDK Release (July 2026)

Azure SDK releases every month. In this post, you'll find this month's highlights and release notes. The post Azure SDK Release (July 2026) ap...

6 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy