Skip to content

client.certificate_inventory

Access certificate inventory assessment exports.

Property

client.certificate_inventory

Methods

  • get_all() -> CertificateInventoryResults: fetch the JSON-backed certificate inventory assessment.
  • get_all_files() -> CertificateInventoryResults: fetch the via-files certificate inventory assessment.

Notes

  • Both methods produce the same results-wrapper type.
  • Choose get_all_files() when you want the export-backed workflow.

API

CertificateInventoryQuery

Query parameters for the /api/certificatesinventory endpoint.

CertificateInventoryResults

CertificateInventoryResults(
    endpoint: BaseEndpoint,
    params: dict[str, str],
    *,
    path: str | None = None,
    single: bool = False,
    files: bool = False,
    method: str = "GET",
    request_kwargs: dict[str, Any] | None = None,
    use_concurrent_skip_pagination: bool | None = None,
    skip_page_size: int | None = None,
    skip_max_concurrent: int | None = None,
)

Results from the /api/certificatesinventory endpoint.

CertificateInventoryEndpoint

CertificateInventoryEndpoint(http: Client, auth: MSALAuth)

Client for the certificate inventory endpoint.

get_all

Get the certificate inventory for a machine.

Docs: - https://learn.microsoft.com/en-us/defender-endpoint/api/export-certificate-inventory-assessment - https://learn.microsoft.com/en-us/defender-endpoint/api/export-certificate-inventory-assessment#1-export-certificate-assessment-json-response

get_all_files

get_all_files() -> CertificateInventoryResults

Get the certificate inventory for a machine as a file.

Same Results as get_all but exported as a file instead of in the response body. Recommended for larger data sets, as it returns zipped files with the data instead of returning it in the response body.

Docs: - https://learn.microsoft.com/en-us/defender-endpoint/api/export-certificate-inventory-assessment - https://learn.microsoft.com/en-us/defender-endpoint/api/export-certificate-inventory-assessment#2-export-certificate-assessment-via-files