fix(m365): avoid user requests in setup_identity app context and user auth log enhancement (#8043)

This commit is contained in:
Hugo Pereira Brito
2025-06-18 11:27:11 +02:00
committed by GitHub
parent 1b73ab2fe4
commit 7de7122c3b
5 changed files with 85 additions and 7 deletions

View File

@@ -169,6 +169,8 @@ export M365_PASSWORD="examplepassword"
These two new environment variables are **required** to execute the PowerShell modules needed to retrieve information from M365 services. Prowler uses Service Principal authentication to access Microsoft Graph and user credentials to authenticate to Microsoft PowerShell modules.
- `M365_USER` should be your Microsoft account email using the **assigned domain in the tenant**. This means it must look like `example@YourCompany.onmicrosoft.com` or `example@YourCompany.com`, but it must be the exact domain assigned to that user in the tenant.
???+ warning
If the user is newly created, you need to sign in with that account first, as Microsoft will prompt you to change the password. If you dont complete this step, user authentication will fail because Microsoft marks the initial password as expired.
???+ warning
The user must not be MFA capable. Microsoft does not allow MFA capable users to authenticate programmatically. See [Microsoft documentation](https://learn.microsoft.com/en-us/entra/identity-platform/scenario-desktop-acquire-token-username-password?tabs=dotnet) for more information.

View File

@@ -171,6 +171,9 @@ Follow these steps to assign the role:
![Grant Admin Consent for Role](./img/grant-admin-consent-for-role.png)
???+ warning
Remember that if the user is newly created, you need to sign in with that account first, as Microsoft will prompt you to change the password. If you dont complete this step, user authentication will fail because Microsoft marks the initial password as expired.
---
## Step 4: Add credentials to Prowler Cloud/App