Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning to Get-PnPFlow command about required permissions #4474

Conversation

NishkalankBezawada
Copy link
Contributor

@NishkalankBezawada NishkalankBezawada commented Oct 24, 2024

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Fixes #X, partially fixes #Y, mentioned in #4353 and #4472, etc.

What is in this Pull Request ?

Add warning to Get-PnPFlow command about required permissions. Before, when executed without required permissions the command just gives 401 Unauthorised error as below,

PS C:\Research\PnPCommunity\powershell> Get-PnpPowerPlatformEnvironment -Identity "xxxx (default)" | Get-PnPFlow
Get-PnPFlow: Unauthorized (401): The x-ms-client-scope header must not be null or empty.
PS C:\Research\PnPCommunity\powershell>

now, after the change, it gives as below,

PS C:\Research\PnPCommunity\powershell> Get-PnPFlow -Environment $env
WARNING: This cmdlet is not available under application permissions
Get-PnPFlow: Make sure you have granted access to Azure AD App to Interact with Power Platform, To help understand the required permissions visit https://pnp.github.io/powershell/articles/determinepermissions.html#help-i-cant-figure-out-which-permissions-i-need
PS C:\Research\PnPCommunity\powershell>
image

Thanks,
Nish

@gautamdsheth gautamdsheth merged commit 65f61bb into pnp:dev Oct 28, 2024
5 checks passed
@gautamdsheth
Copy link
Collaborator

Thanks @NishkalankBezawada , merged it !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants