dirkjanm / dirkjanm/ROADtools

policy plugin errors on msgraph branch

Open
#138 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.7k
Forks
395
PR merge metrics
No merged PRs in 30d

Description

Hi DirkJan,
I am doing the CARTE lab and am using ROADtools. The lab uses the https://graph.microsoft.com endpoint so I am using the msgraph branch.
roadrecon auth -mg works, roadrecon gather -mg collects the data (using --mfa throws a number of errors, but skip for now). I wanted to try the roadrecon plugin policies, but that throws an error on the database structure of the Policys table:

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: Policys.objectType [SQL: SELECT "Policys"."objectType" AS "Policys_objectType", "Policys"."objectId" AS "Policys_objectId", "Policys"."deletionTimestamp" AS "Policys_deletionTimestamp", "Policys"."displayName" AS "Policys_displayName", "Policys"."keyCredentials" AS "Policys_keyCredentials", "Policys"."policyType" AS "Policys_policyType", "Policys"."policyDetail" AS "Policys_policyDetail", "Policys"."policyIdentifier" AS "Policys_policyIdentifier", "Policys"."tenantDefaultPolicy" AS "Policys_tenantDefaultPolicy" FROM "Policys" WHERE "Policys"."policyType" = ? ORDER BY "Policys"."displayName"] [parameters: (18,)] (Background on this error at: https://sqlalche.me/e/20/e3q8)

Using sqlite3 and looking at the table, it has the following columns:

select * from Policys limit 1; conditions|createdDateTime|displayName|grantControls|id|modifiedDateTime|sessionControls|state

I had a similar error when trying to make an xlsexport, a missing objectType on the Users column.

Is the policies plugin not compatible with the msgraph data? Or is there something else happening?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the Policys table columns produced by the msgraph branch with the fields expected by the policies plugin, using the gathered SQLite database and the reported SQL error. Check the similar missing objectType error in the Users table and reproduce both the policy plugin and xlsexport failures; done means msgraph data works without missing-column errors or the incompatibility is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlite
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.