Hello,
I am trying to monitor my Power automate flows through a scheduled powershell script + m365 CLI. I use the following command which works perfectly with my user account:
m365 flow list --environment $environment --output json
Now I would like to use it through an app ID authentication (m365 login --secret). I made an app registration with access to Flow Service (Flow.Read.All as API permission).
I login succesfully but when I run the same command, I get the following error:
x-ms-client-scope header must not be null or empty
Behing the scene I guess the power automate API use delegated permissions. Is there a way to execute the m365 flow command without a user account ? I think of using a service account but if you have another thoughts, please help :). Or maybe there is something specific to configure within the app registration to make it work with m365 CLI ?
I saw @VelinGeorgiev had the same issue a couple of years ago : #1048
David
Hello,
I am trying to monitor my Power automate flows through a scheduled powershell script + m365 CLI. I use the following command which works perfectly with my user account:
m365 flow list --environment $environment --output jsonNow I would like to use it through an app ID authentication (
m365 login --secret). I made an app registration with access to Flow Service (Flow.Read.All as API permission).I login succesfully but when I run the same command, I get the following error:
x-ms-client-scope header must not be null or empty
Behing the scene I guess the power automate API use delegated permissions. Is there a way to execute the m365 flow command without a user account ? I think of using a service account but if you have another thoughts, please help :). Or maybe there is something specific to configure within the app registration to make it work with m365 CLI ?
I saw @VelinGeorgiev had the same issue a couple of years ago : #1048
David