JulianHayward / Azure-MG-Sub-Governance-Reporting

Azure Governance Visualizer aka AzGovViz is a PowerShell script that captures Azure Governance related information such as Azure Policy, RBAC (a lot more) by polling Azure ARM, Storage and Microsoft Graph APIs.
MIT License
817 stars 295 forks source link

Pipeline Error: HTML NOT published. Please configure authentication on the webApp #183

Closed ashley-kainos closed 1 year ago

ashley-kainos commented 1 year ago

AzGovViz version latest version

CodeRunPlatform Azure DevOps

Describe the bug Pipeline failing due to authentication needed, but Auth has been configured to use Microsoft auth

[AzAPICall 1.1.72] DEBUGTASK: AzAPICall - Check if WebApp (xxx.azurewebsites.net) has Authentication enabled -> unexpectedError: false [AzAPICall 1.1.72] DEBUGTASK: AzAPICall - Check if WebApp (xxx.azurewebsites.net) has Authentication enabled -> apiStatusCode: '403' (Forbidden) [AzAPICallErrorHandler 1.1.72] AzAPICall - Check if WebApp (xxx.azurewebsites.net) has Authentication enabled try #1; return: (StatusCode: '403' (Forbidden)) <.code: ''> <.error.code: 'AuthorizationFailed'> | <.message: ''> <.error.message: 'The client '' with object id '' does not have authorization to perform action 'Microsoft.Web/sites/config/list/action' over scope '/subscriptions//resourceGroups/rg-azgovviz-devops-001/providers/Microsoft.Web/sites/xxx.azurewebsites.net/config/authsettings' or the scope is invalid. If access was recently granted, please refresh your credentials.'> - AzAPICall: not reasonable, retry #1 of 5 [AzAPICall 1.1.72] $AzAPICallErrorHandlerResponse.action unexpected ($AzAPICallErrorHandlerResponse.action = '') - breaking WebApp (xxx.azurewebsites.net) has Authentication enabled: Assuming and insisting that you do not want to publish your tenant insights to the public HTML NOT published. Please configure authentication on the webApp (xxx.azurewebsites.net)

[error]PowerShell exited with code '1'.

Finishing: Publish HTML to WebApp

Screenshots If applicable, add screenshots to help explain your problem. Screenshot is only an addition paste the error output as text, please.

Additional context Add any other context about the problem here.

JulianHayward commented 1 year ago

@ashley-kainos have you assigned the required RBAC for the Service Connection´s service principal on the webApp? setup guide

JulianHayward commented 1 year ago

@ashley-kainos can you please provide an update?

ashley-kainos commented 1 year ago

Hi, I worked it out that an Azure Policy was blocking it so all fixed now

Thanks Ashley

From: quoteee @.> Sent: 21 April 2023 16:59 To: JulianHayward/Azure-MG-Sub-Governance-Reporting @.> Cc: Ashley Rutland @.>; Mention @.> Subject: Re: [JulianHayward/Azure-MG-Sub-Governance-Reporting] Pipeline Error: HTML NOT published. Please configure authentication on the webApp (Issue #183)

CAUTION: This email originated from outside of Kainos. Do not click links or open attachments unless you recognise the sender and know the content is safe

@ashley-kainoshttps://github.com/ashley-kainos can you please provide an update?

- Reply to this email directly, view it on GitHubhttps://github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting/issues/183#issuecomment-1518035187, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2BWTVHVFQRVMC37AGEO5Y3XCKVEXANCNFSM6AAAAAAXDY5PRQ. You are receiving this because you were mentioned.Message ID: @.**@.>>

JulianHayward commented 1 year ago

these policies... :) thanks!