Agentless assessment
Get a shadow-AI and third-party-app risk report into NobleCloak Discover without connecting your identity provider or Google Workspace to us. You run a small open-source script on your own machine against data you already have access to, review the file it writes, and upload that file yourself. Nothing leaves your machine until you upload it. See the privacy statement for exactly what is in the file and what never leaves.
This page has everything you need: pick a script, download it, run it, upload the result.
1. Pick your script
| Your directory | Use | Needs |
|---|---|---|
| Google Workspace | nc-export.py | Python 3.9+, Admin console access |
| Microsoft Entra ID, live from Graph | nc-export-entra.ps1 | PowerShell 7+, consent to three read-only scopes |
| Microsoft Entra ID, from Graph Explorer exports | nc-export.py | Python 3.9+, Graph Explorer |
2. Download and verify
No code-signing is applied, so check the SHA-256 of what you downloaded before you run it. Each link goes straight to the release file.
| Download (v0.1.1) | SHA-256 |
|---|---|
nc-export.py | 635c5af758dea50e691e3fd32c265c8753209595d007521843edc793032c121d |
nc-export-entra.ps1 | 92c14cc1924a7d8af925963a0a460313167c96b829bcec9988dc5a23ddd6c896 |
Verify on macOS or Linux with shasum -a 256 <file>, or on Windows with
Get-FileHash <file> -Algorithm SHA256. A mismatch means do not run the
script; contact support@noblecloak.com. The
downloads page has the format spec, the SHA256SUMS.txt
sidecar and how the checksums are produced.
3. Export and run
- Google Workspace
- Entra: PowerShell
- Entra: Graph Explorer
You need: Python 3.9 or newer (no packages to install; macOS's built-in
python3 is enough) and Google Admin console access to the audit logs and
the Users list. On Windows, where python3 is often the Microsoft Store stub,
use py nc-export.py ... instead.
-
Export the OAuth log events. In the Admin console, open Reporting > Audit and investigation > OAuth log events, set the date range, then Download > CSV. Note the date range you chose and your console's UTC offset; you pass them in step 3. Google keeps OAuth Token log events for 6 months and admins can't change that, so an app authorized before then and never re-authorized since will not appear. The logs can also lag by up to a few hours, so grants from the last few hours may be missing. See Google's Data retention and lag times.
-
Export the users (optional). Open Directory > Users > Download users > All user info columns > CSV. This gives the report an accurate
userCountTotal. Skip it and that field is leftnullrather than guessed. -
Run the script from the folder you downloaded it into. Pass the CSV files exactly as downloaded; do not open and re-save them. The file names below are examples.
python3 nc-export.py google \--audit-csv OauthLogEvents.csv \--users-csv users.csv \--export-window-start 2026-11-11T00:00:00-05:00 \--export-window-end 2026-11-18T23:59:59-05:00 \--out-dir ./out--audit-csvand--out-dirare required.--users-csvis optional.--export-window-startand--export-window-endgo together: give the date range from step 1 with your UTC offset. Leave both out and the header'sexportWindowisnull; the script never guesses it from the event dates.Only
Authorizeevents become grants. Other events in the download, such asRevoke, are left out, with a count printed to the terminal.
You need: PowerShell 7+ (pwsh), the Microsoft Graph PowerShell SDK
(Install-Module Microsoft.Graph), and an account that can consent to three
read-only Graph scopes. Depending on your tenant's consent settings, an
administrator may need to grant or pre-approve them.
-
Unblock the script (Windows). The script is unsigned and a browser download is marked as from the internet, so PowerShell's default execution policy blocks it until you run this after checking the checksum:
Unblock-File .\nc-export-entra.ps1 -
Run the script from the folder you downloaded it into. It calls Microsoft Graph for you, so there is nothing to export by hand.
pwsh ./nc-export-entra.ps1 -OutDir ./out -
Sign in and consent when prompted. The script asks for exactly
User.Read.All,Application.Read.AllandDirectory.Read.All, and fails loudly if your tenant's consent flow drops one, rather than exporting a partial result.
You need: Python 3.9 or newer (on Windows, where python3 is often the
Microsoft Store stub, use py nc-export.py ... instead), and access to
Graph Explorer
signed in as an account that can read users, service principals and OAuth
grants. Graph Explorer asks for the same three read-only scopes as the
PowerShell path: User.Read.All, Application.Read.All,
Directory.Read.All.
-
Run three queries in Graph Explorer and save each response as JSON (Save response as JSON, or copy the body). Each is a Graph list document,
{"value": [...]}, which is what the script expects.Query Save as GET https://graph.microsoft.com/v1.0/usersusers.jsonGET https://graph.microsoft.com/v1.0/servicePrincipalsservicePrincipals.jsonGET https://graph.microsoft.com/v1.0/oauth2PermissionGrantsoauth2PermissionGrants.jsonIf a response pages through
@odata.nextLink, merge every page'svaluearray into one{"value": [...]}file. The Graph Explorer guide has an example and the optional fourth query for app-role assignments. -
Run the script from the folder you downloaded it into. It reads only the files you name and makes no network calls.
python3 nc-export.py entra \--users-json users.json \--service-principals-json servicePrincipals.json \--grants-json oauth2PermissionGrants.json \--out-dir ./out
When the script finishes it prints:
Skipped rows: 0
Nothing has been sent anywhere. Review discover-export.ndjson, then upload it in the Discover app.
Skipped rows is always printed, even when it is 0. A row with a missing
identity value is skipped with a warning rather than silently mangled.
4. Review and upload
- Open
./out/discover-export.ndjsonand read it. It is plain newline-delimited JSON; the export format page describes every field. - Keep
./out/mapping.csvand./out/salt.txton your machine. They map the pseudonyms back to real users, and they are not meant to be shared. - Go back to the setup wizard's Scan step. Under Export file
(discover-export.ndjson), click Choose file, select
discover-export.ndjson, then click Upload.
More detail per path, including what to do when something goes wrong: Google Workspace, Entra PowerShell, Entra Graph Explorer.
What this gives you
An export-based report is a point-in-time snapshot:
- It reflects the grants in the export you ran the script on. Nothing gets more current until you export and upload again.
- For Google Workspace, the source is the OAuth log events the Admin console still holds. Google limits how long it keeps them, so an app authorized before that window and never re-authorized since will not appear.
- Coverage is stated, not assumed. When the script cannot determine the
total number of users or the export's time window, those fields are
nullin the file rather than guessed. The export format page shows what that looks like.
When to connect directly instead
The Discover app also offers a direct connection to your identity provider, set up inside the app (look for Connect on the empty state). Choose it over this lane when you want a live view of grants, the sanctioned-app signal that tells a company-approved integration from a self-granted one, or continuous re-scanning without anyone re-running a script. This lane is for the opposite case: you want a report today, without connecting anything, and a snapshot is an acceptable trade.
Reference
- Discover Export Format (DEF): the exact file shape the scripts produce
- Downloads and checksums: the tagged release, the spec, and how to verify what you downloaded
- Privacy statement