Skip to main content
Connector guides

Connect Inforcer

Inforcer is a Microsoft 365 policy management platform. An MSP uses it to hold a baseline of Intune, Defender and Entra policy, align every customer tenant to that baseline, document what is deployed,…

Written By Christopher Scaminaci

Last updated 8 days ago

Inforcer is a Microsoft 365 policy management platform. An MSP uses it to hold a baseline of Intune, Defender and Entra policy, align every customer tenant to that baseline, document what is deployed, and run assessments and reports. StackJack connects an AI assistant to Inforcer's public API.

Connecting Inforcer to StackJack gives your AI assistant a family of inforcer_ MCP tools. MCP (Model Context Protocol) tools are the standardized commands an AI assistant can call through StackJack. With them, your AI can:

  • Find the tenants you manage - every Microsoft 365 tenant the API client can see, with its alignment summary and licenses
  • Read what is deployed - a tenant's policies in Inforcer's format, its Microsoft Secure Score and history, and its Entra directory roles
  • Measure drift - the baselines you hold, the alignment score of each tenant against each baseline, and the per-policy comparison of one tenant with one baseline
  • Look inside a tenant - Entra users (with their groups, roles and devices), groups and group members
  • Run assessments and reports (on Pro plans) - run an assessment against a tenant, trigger a report for one or more tenants, and download the finished file
  • Review activity - search the Inforcer activity log by user, event type and date

How StackJack authenticates to Inforcer

Inforcer uses an API client: a client ID and a client secret. StackJack exchanges the pair for a short-lived token on its own and never shows the token. You enter the pair and the region your Inforcer account is in.

Creating the API client

  1. Sign in to the Inforcer portal and open Configure, then REST API.
  2. Create an API client. On its Permissions tab, grant the areas you want StackJack to use: Tenants, Policies, User and Group Management, Entra Dashboard, Baselines, Align, Tenant Assessment, Reports and Activity. Inforcer has not published which permission each route needs, so grant the read permission of every area you need. Add the run permissions for assessments and reports if you want those tools.
  3. If the client should reach only some customers, limit it on the Filters tab. A tenant outside the filter is answered as not found.
  4. Copy the client ID and the client secret when you create the client. Store the secret before you leave the page.

Choosing the region

Choose the region you sign in to Inforcer in: United States, Europe, United Kingdom, or Australia and New Zealand. A client only works in the region it was created in. The wrong region is refused in exactly the same way as a wrong secret, so StackJack has no default and asks you to choose.

Connect it in StackJack

  1. Open Connectors, then Inforcer.
  2. Choose the Region, enter the Client ID and the Client secret.
  3. Click Test connection. StackJack asks Inforcer for a new token and reads the baselines list. Both steps change nothing.

Enter the region, the client ID and the secret again whenever you save the connection, including when you only rename it.

What is worth knowing before you start

Permissions decide what works

The client's permissions are set in Inforcer, and StackJack cannot widen them. A call for an area the client does not hold fails with a clear message that names the permission area, and that failure does not count against the connection. The connection test reads the baselines, so a client without the Baselines permission shows a refused test even though the client works for the areas it does hold.

Tenants and their ids

Inforcer addresses a tenant by its Microsoft Entra tenant id, a GUID. Start with inforcer_list_tenants: every tenant tool takes the msTenantId it returns. A tenant that is outside the client's filter, or that does not exist, answers not found.

Paging

Lists that page return a continuationToken. Read the first page, then pass the token back unchanged until an answer carries none. Users come 200 to a page, groups 20 and group members 100. The activity log search takes the token in its request, with a pageSize of 1 to 100 (default 25). Narrow a list with search (users and groups) instead of reading every page.

Policies can be large

inforcer_list_tenant_policies returns every policy of a tenant. A non-empty failedPolicyTypes object in the answer means the list is partial: each entry names a policy type Inforcer could not read and why, for example a tenant with no Windows 365 license.

Assessments and reports

Running an assessment or triggering a report is a Pro tool. Both read the customer tenant and store a run inside Inforcer. They change nothing in the tenant, delete nothing and contact no one. The assessment runs while StackJack waits and can take a while. A report is queued: trigger it, then read inforcer_list_report_runs until it finishes, then inforcer_list_report_run_outputs, then inforcer_get_report_run_output for the file. A report run is listed for 7 days.

Triggering a report again queues a second run, and running an assessment again runs it again, so read the run list before you repeat a call that failed.

Report files

A report is rendered as a PDF, CSV, HTML or JSON file. inforcer_get_report_run_output stores the file and answers a temporary download link that works for 30 minutes, with the file name, type and size. Open the link before it expires: StackJack keeps no other copy. Files over 50 MB are refused.

Rate limit

Inforcer allows 400 calls a minute for each partner, shared by every API client of the partner. A call that fans out over many tenants costs one call per tenant. StackJack paces one connection below the limit and backs off when Inforcer asks it to slow down.

When Inforcer refuses a call

  • The client is refused: the client ID or secret is wrong, the client was removed, or the region is not the one the client was created in. Create a client under Configure, then REST API, and paste the region, the client ID and the secret again.
  • The client lacks a permission (403): grant the area on the client's Permissions tab. A report type also needs every target tenant to hold the license that report needs.
  • A tenant, user, group, run or output is not found (404): check the id against the list tools. A tenant outside the client's filter answers the same way.
  • A value is rejected (400): the answer names the field. A continuationToken must be passed back exactly as Inforcer returned it.
  • Rate limited (429) or an outage (5xx): wait and try again. An assessment run can answer 500 or 502.

Plans and limits

Reads are available on the Free tier, including the activity log search. Running an assessment, triggering a report and downloading a report file are Pro. Business reaches the same tools as Pro and differs by monthly call quota.

See the generated Inforcer tool reference for the current inventory, plan assignment, input schemas and destructive-action labels.

Inforcer tools

inforcer_ · 22 tools · Free 19 · Pro 3

Tenants

ToolWhat it does
inforcer_get_tenant
Free · Read-only
Returns one tenant with its details, licenses and authentication mode.
inforcer_get_tenant_secure_scores
Free · Read-only
Returns a tenant's Microsoft Secure Score, its history and the controls that would raise it.
inforcer_list_tenant_directory_roles
Free · Read-only
Lists the Entra directory role definitions of one tenant.
inforcer_list_tenant_policies
Free · Read-only
Lists the policies of one tenant in Inforcer's policy format (Intune, Defender, Entra and the other policy types Inforcer manages).
inforcer_list_tenants
Free · Read-only
Lists the Microsoft 365 tenants the API client can see, with their alignment summary.

Users and groups

ToolWhat it does
inforcer_get_tenant_group
Free · Read-only
Returns one Microsoft Entra group.
inforcer_get_tenant_user
Free · Read-only
Returns one Microsoft Entra user with their groups, roles and devices.
inforcer_list_tenant_group_members
Free · Read-only
Lists the direct members of one Microsoft Entra group, 100 a page.
inforcer_list_tenant_groups
Free · Read-only
Lists a tenant's Microsoft Entra groups, 20 a page.
inforcer_list_tenant_users
Free · Read-only
Lists a tenant's Microsoft Entra users by display name, up to 200 a page, with their group and role counts.

Baselines and alignment

ToolWhat it does
inforcer_get_tenant_alignment_details
Free · Read-only
Compares one tenant's policies with a baseline it is aligned against and returns the per-policy result: matched, matched with accepted deviations, deviated, missing from the tenant and additional in the tenant.
inforcer_list_alignment_scores
Free · Read-only
Lists the alignment score of each licensed tenant the API client can see against each of its baselines.
inforcer_list_baselines
Free · Read-only
Lists the baselines whose baseline tenant the API client can see, with their member tenants and policy categories.

Assessments

ToolWhat it does
inforcer_list_assessments
Free · Read-only
Lists the assessments available to the API client.
inforcer_run_tenant_assessment
Pro · Write
Runs one assessment against one tenant and answers with the result of each of its checks.

Reports

ToolWhat it does
inforcer_get_report_run_output
Pro · Read-only
Downloads one output of a finished report run (a PDF, CSV, HTML or JSON file, in the format the report was run with).
inforcer_list_report_run_outputs
Free · Read-only
Lists the rendered outputs of a finished report run: one per tenant, and a collated one when the run was collated.
inforcer_list_report_runs
Free · Read-only
Lists the client's report runs from the last 7 days, newest first, at most 500. A run started by this API client is always listed.
inforcer_list_report_types
Free · Read-only
Lists the report types the API client may run.
inforcer_trigger_report_run
Pro · Write
Queues a run of one or more reports for one or more tenants and answers 202 with the reportRunId.

Audit events

ToolWhat it does
inforcer_list_audit_event_types
Free · Read-only
Lists the event types the Inforcer activity log records and a partner can filter on.
inforcer_search_audit_events
Free · Read-only
Searches the Inforcer activity log of the API client's client, newest first.