cli-microsoft365: Bug report: flow list times out on big environments
Priority
(Medium) I’m annoyed but I’ll live
Description
I want to create a report about all the flows in the company. When I use the following code it works for an environment with a few flows, but we also have environments with multiple thousands of flow, and there ich receive the following error:
$smallEnvFlows = m365 flow list --environmentName $smallEnv --asAdmin | ConvertFrom-Json
# This works (environment has less than 100 flows)
$bigEnvFlows = m365 flow list --environmentName $bigEnv --asAdmin | ConvertFrom-Json
# Returns the following error:
Error: The gateway did not receive a response from 'Microsoft.ProcessSimple' within the specified time period.
Is there a way around this error or can this be fixed? I’am using v7.1.0.
Steps to reproduce
m365 login
$bigEnvId = "c2548128-8c94-ffff-8c04-214b44309982"
$bigEnvFlows = m365 flow list --environmentName $bigEnvId --asAdmin | ConvertFrom-Json
Expected results
Expecting an enumeration of flows of the big environment.
Actual results
Error: The gateway did not receive a response from ‘Microsoft.ProcessSimple’ within the specified time period.
Diagnostics
No response
CLI for Microsoft 365 version
7.1.0
nodejs version
18.17.1
Operating system (environment)
macOS
Shell
PowerShell
cli doctor
{ “os”: { “platform”: “darwin”, “version”: “Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:34 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8103”, “release”: “23.0.0” }, “cliVersion”: “7.1.0”, “nodeVersion”: “v18.17.1”, “cliAadAppId”: “31359c7f-bd7e-475c-86db-fdb8c937548e”, “cliAadAppTenant”: “common”, “authMode”: “DeviceCode”, “cliEnvironment”: “”, “cliConfig”: {}, “roles”: [], “scopes”: { “https://graph.microsoft.com”: [ “AllSites.FullControl”, “AppCatalog.ReadWrite.All”, “AuditLog.Read.All”, “ChannelMember.ReadWrite.All”, “ChannelMessage.Read.All”, “ChannelMessage.Send”, “ChannelSettings.ReadWrite.All”, “Chat.Read”, “Chat.ReadWrite”, “Directory.AccessAsUser.All”, “Directory.ReadWrite.All”, “Group.ReadWrite.All”, “IdentityProvider.ReadWrite.All”, “Mail.ReadWrite”, “Mail.Send”, “Place.Read.All”, “Policy.Read.All”, “Reports.Read.All”, “SecurityEvents.Read.All”, “ServiceHealth.Read.All”, “ServiceMessage.Read.All”, “ServiceMessageViewpoint.Write”, “Tasks.ReadWrite”, “Team.Create”, “TeamMember.ReadWrite.All”, “TeamsApp.ReadWrite.All”, “TeamsAppInstallation.ReadWriteForUser”, “TeamSettings.ReadWrite.All”, “TeamsTab.ReadWrite.All”, “TermStore.ReadWrite.All”, “User.Invite.All”, “User.ReadWrite.All”, “profile”, “openid”, “email” ], “https://service.powerapps.com/”: [ “User” ], “https://management.azure.com”: [ “user_impersonation” ] } }
Additional Info
No response
About this issue
- Original URL
- State: open
- Created 7 months ago
- Comments: 15 (10 by maintainers)
@waldekmastykarz yeah, I tested the API and it works well. I can request 250 items per page, and after that I can use the nextLink link to get the next 250.
Are you sure though that this issue needs to be closed? We may need to look into the paging part still…
So @ved-leachim, you can just run the following in powershell:
it will get the token and execute the call.
Using
m365 request
would be easy as well 😂Hi @waldekmastykarz, thanks for your reply. Since I am not so strong with bash or zsh, I transformed your commands, to what I think should work, in powershell.
I receive what looks like a valid access token but when I use it in the last command I receive the following error:
According ms-docs this means the token is like not complete, which shouldn’t be the case here. invalid-authentication-token
Hey @waldekmastykarz thank for your reply.
I am unsure if 100 flows are enough, as mentioned we have an environment with multiple thousands of flows.