Skip to content
Connector

Microsoft Graph (Generic) v2

Call any Microsoft Graph endpoint: paging, batch and five sign-in methods

Calls any Microsoft Graph endpoint with paging, $batch and binary download; signs in by secret, certificate, device code, auth code or managed identity.

@ftnt-dspilleMaintainer v3.0.1 Published Nov 28, 2026
Download .tgz · 28 KB

microsoft-graph-generic-v2_3.0.1.tgz

sha256:affb8333ca3bdc2694208bed626dbfc84f5ed60d480fc308871ea709d701e8a8

Community code that runs on your platform. A maintainer reviewed this exact source; the download is rebuilt from it. Follow the to install it.

A generic Microsoft Graph REST API connector. The Execute Graph Request operation (and its newer name, Execute API Request) calls any Graph endpoint with any HTTP method, a JSON body, query parameters and extra headers, so every Graph surface your app registration can reach is available without connector updates. Paginate follows @odata.nextLink and merges the pages into one list, bounded by Max Pages. Graph Batch sends up to 20 requests in one $batch call and returns each response plus the failed ids. Execute Graph Request can also download a binary GET response as base64. Sign-in uses MSAL with five methods: client secret, client certificate, device code, authorization code with PKCE, and managed identity. Delegated tokens persist in the connector configuration between playbook runs. Full URLs are refused, and nextLinks are followed only when they point at the configured Graph host.

Live-tested on FortiSOAR 8.0.1 against a Microsoft 365 lab tenant.

Authentication needs a Microsoft Entra ID app registration with the Graph permissions your playbooks use, admin consented. Client secret, client certificate and managed identity use application permissions. Device code and authorization code act for the signed-in user and use delegated permissions. The sample playbooks need the application permission User.Read.All.

Not live-tested:

  • complete_device_login: needs a person to sign in at the device login page. The lab run without that sign-in returned "No pending device login". The success shape is covered offline by a synthetic mock.
  • complete_auth_login: needs a person to sign in through the browser and paste the redirected URL. The lab run without it returned "No pending auth-code login". The success shape is covered offline by a synthetic mock.
  • Client Certificate and Managed Identity sign-in: not exercised on the lab tenant (the lab record used client secret, device code and authorization code). Covered by the offline suite only.
  • HTTP 429 (throttling): the error mock is synthetic, because throttling cannot be provoked on demand. HTTP 400, 401, 403 and 404 error mocks were captured live.

Configuration · 16 fields

  • Authentication Method auth_method select required

    How access tokens are acquired. Client Secret and Client Certificate use app permissions (client credentials). Device Code and Authorization Code act on behalf of a signed-in user (delegated permissions) and need their one-time login operations. Managed Identity uses the identity of the Azure VM or Arc server FortiSOAR runs on.

    Options Client SecretClient CertificateDevice CodeAuthorization CodeManaged Identity
  • Tenant ID tenant_id text

    Microsoft Entra ID tenant (directory) ID or domain. Required for every method except Managed Identity.

  • Client ID client_id text

    Application (client) ID of the Entra ID app registration. Required for every method except Managed Identity (where it selects a user-assigned identity).

  • Client Secret client_secret password

    Client secret of the app registration. Required for the Client Secret method.

  • Private Key (PEM) private_key password

    PEM private key of the certificate uploaded to the app registration (Client Certificate method). A private-key File field is also accepted.

  • Public Certificate (PEM) public_certificate text

    (Optional, Client Certificate method) PEM public certificate matching the private key. With MSAL 1.35+ the SHA-256 thumbprint is computed from it; it also enables Subject Name/Issuer authentication.

  • Certificate Thumbprint thumbprint text

    (Optional, Client Certificate method) SHA-1 thumbprint of the certificate as shown in the app registration. Provide this or the public certificate.

  • Private Key Passphrase certificate_passphrase password

    (Optional, Client Certificate method) Passphrase if the private key is encrypted.

  • Managed Identity Client ID managed_identity_client_id text

    (Optional, Managed Identity method) Client ID of the user-assigned managed identity. Leave empty for the system-assigned identity.

  • Authority Host authority_host text

    Microsoft Entra ID authority host. Default: https://login.microsoftonline.com; sovereign clouds use their own, for example https://login.microsoftonline.us or https://login.china.cloudapi.cn.

  • Graph Host graph_host text

    Microsoft Graph endpoint host. Default: graph.microsoft.com; national clouds use their own, for example graph.microsoft.us or microsoftgraph.chinacloudapi.cn.

    Default graph.microsoft.com

  • API Version api_version select

    Graph API version used for relative URLs. An explicit /v1.0/ or /beta/ prefix on the operation URL overrides it.

    Default v1.0

    Options v1.0beta
  • Scopes scopes text

    (Optional) Space- or comma-separated scopes. Default: https://<graph host>/.default. Delegated methods always add offline_access so tokens can be refreshed.

  • Redirect URL redirect_url text

    (Authorization Code method) Redirect URI registered on the app as a Mobile and desktop application platform. Default: http://localhost.

    Default http://localhost

  • Verify SSL verify_ssl checkbox

    Specifies whether SSL certificates are to be verified.

    Default true

  • Request Timeout (seconds) timeout text

    Per-request timeout in seconds applied to token and Graph calls.

    Default 30

Operations · 8

  • Health Check
    health_check

    Verify the configuration end to end: acquire a token with the configured method and GET /$metadata, the one Graph endpoint any valid token can read.

    No parameters.

    Returns typeproperties
  • Execute Graph Request 9 params
    execute_graph_request

    Calls any Microsoft Graph endpoint with any HTTP method. The URL is a Graph path such as /v1.0/users or me/sendMail (a full URL is refused so the token only ever goes to the configured Graph host). Optionally follows @odata.nextLink to collect every page, or downloads a binary response as base64.

    • URL url text required

      Graph path, with or without a leading version segment (/v1.0/users, /beta/..., users).

    • Method method select

      HTTP method. Defaults to GET.

      Default GET

      Options GETPOSTPUTPATCHDELETE
    • Query Parameters query_params json

      (Optional) JSON object of query string parameters, for example {"$select": "displayName,mail", "$top": 25}.

    • Request Body request_body json

      (Optional) JSON body sent with POST, PUT and PATCH. Non-JSON text is sent as plain text.

    • Extra Headers extra_headers json

      (Optional) JSON object of extra request headers, for example {"ConsistencyLevel": "eventual"} for advanced queries.

    • Paginate paginate checkbox

      Follow @odata.nextLink and merge every page's value array into one items list. GET requests only.

      Default false

      When Paginate is true

      • Max Pages max_pages integer

        (Optional) Stop after this many pages. Default 10, at most 100.

        Default 10

    • Max Pages max_pages integer

      (Optional, with Paginate) Stop after this many pages. Default 10, at most 100.

      Default 10

    • Download download checkbox

      Return a binary GET response as base64 content (content_base64, content_type, size), for example a file or photo.

      Default false

    • API Version api_version select

      (Optional) Override the configured API version for this request.

      Options v1.0beta
    Returns typeproperties
  • Execute API Request 9 params
    execute_api_request

    Generic pass-through for any Microsoft Graph endpoint, using the connector's own auth. Same behaviour as Execute Graph Request (the name used by earlier playbooks); use this name in new playbooks.

    • URL url text required

      Graph path, with or without a leading version segment (/v1.0/users, /beta/..., users).

    • Method method select

      HTTP method. Defaults to GET.

      Default GET

      Options GETPOSTPUTPATCHDELETE
    • Query Parameters query_params json

      (Optional) JSON object of query string parameters, for example {"$select": "displayName,mail", "$top": 25}.

    • Request Body request_body json

      (Optional) JSON body sent with POST, PUT and PATCH. Non-JSON text is sent as plain text.

    • Extra Headers extra_headers json

      (Optional) JSON object of extra request headers, for example {"ConsistencyLevel": "eventual"} for advanced queries.

    • Paginate paginate checkbox

      Follow @odata.nextLink and merge every page's value array into one items list. GET requests only.

      Default false

      When Paginate is true

      • Max Pages max_pages integer

        (Optional) Stop after this many pages. Default 10, at most 100.

        Default 10

    • Max Pages max_pages integer

      (Optional, with Paginate) Stop after this many pages. Default 10, at most 100.

      Default 10

    • Download download checkbox

      Return a binary GET response as base64 content (content_base64, content_type, size), for example a file or photo.

      Default false

    • API Version api_version select

      (Optional) Override the configured API version for this request.

      Options v1.0beta
    Returns typeproperties
  • Graph Batch 2 params
    graph_batch

    Submit a JSON array of requests as one Graph $batch POST (at most 20 requests, relative URLs, each with id, method and url). Returns every individual response plus the ids that failed.

    • Requests requests json required

      JSON array of up to 20 batch requests with relative URLs.

    • API Version api_version select

      (Optional) Override the configured API version for the batch call.

      Options v1.0beta
    Returns typeproperties
  • Start Device Login
    start_device_login

    Begins the device code flow (Auth Method: Device Code): returns a user code and the microsoft.com/devicelogin URL. Sign in there with the account, then run Complete Device Login. The pending flow is stored in the connector configuration.

    No parameters.

    Returns typeproperties
  • Complete Device Login 1 param
    complete_device_login

    Finishes the device code flow started by Start Device Login: polls Entra ID until you have signed in (bounded by Wait Seconds), stores the tokens in the connector configuration, and reports the signed-in user.

    • Wait Seconds wait_seconds integer

      (Optional) How long to wait for you to finish signing in, between 5 and 600. Default 120.

      Default 120

    Returns typeproperties
  • Get Auth Code URL
    get_auth_code_url

    Begins the delegated authorization code flow with PKCE (Auth Method: Authorization Code): returns the sign-in URL for the configured redirect URL. Open it, sign in as the user, then pass the address you were redirected to (including ?code=...) to Complete Auth Login.

    No parameters.

    Returns typeproperties
  • Complete Auth Login 2 params
    complete_auth_login

    Finishes the authorization code flow: pass the full redirected URL (or just the code) from the sign-in. Validates the state, stores the tokens in the connector configuration for later operations, and reports the signed-in user.

    • Redirected URL redirected_url text

      The full address the sign-in redirected you to. Either this or Code is required.

    • Code code text

      (Optional) Just the authorization code, if you did not paste the full URL.

    Returns typeproperties
Something wrong with this item? Sign in to report

Report a problem

Sensitive data, copied content, broken imports, anything that shouldn't be here.

At least 10 characters. Please don't paste the sensitive value itself.0/1000