Authenticating multiple Azure subscriptions using Azure DevOps Pipelines

Is there any solution to Authenticate multiple Azure Subscriptions simultaneously using Azure DevOps pipelines, because the scripts I run in local with Az login are not working in pipelines as its only authenticating one subscription at a time.