Hi @Amrita Sengupta ,
What's your SharePoint Online PowerShell version? Check by this command:
Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version
Then have a try to update it to the latest using below command and verify if your issue has been fixed.
Update-module microsoft.online.sharepoint.powershell
----------
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.