Closed piaudonn closed 6 months ago
@briandelmsft - my brain isn't working fully, just to let you know 🤯
@piaudonn I added a default value for the risk reasons here: https://github.com/briandelmsft/STAT-Function/blob/314012c5a7871fc258c5f1fceff9ac11445ab29e/modules/aadrisks.py#L55-L56
Otherwise, if none of the risk events have a risk reason, the table will fail to build here as that column is expected: https://github.com/briandelmsft/STAT-Function/blob/314012c5a7871fc258c5f1fceff9ac11445ab29e/modules/aadrisks.py#L96
I also renamed the local user_risk_level to user_risk_detections to better reflect the data it was carrying
Addressing #57
There are risks with no risk reasons (like Unlikely travel). If that's the case we skip the
risk_reasons
management.Also, added the following default values in the
current_account
dictionary:This is to address an issue if the function doesn't have the permission to call the
riskDetections
endpoint (missingIdentityRiskEvent.Read.All
can happen after an update - well happened to me) but continues until it fails atbecause
UserRiskDetectionCount
doesn't exist (instead of telling us it is a permission issue on the Graph API call).