Microsoft Graph Applications and Service Principals API — Service Principals

Microsoft Graph Applications and Service Principals API — Service Principals. 3 operations. Lead operation: Active Directory List Service Principals. Self-contained Naftiko capability covering one Active Directory business surface.

Run with Naftiko Active DirectoryService Principals

What You Can Do

GET
Listserviceprincipals — Active Directory List Service Principals
/v1/serviceprincipals
GET
Getserviceprincipal — Active Directory Get Service Principal
/v1/serviceprincipals/{serviceprincipalid}
GET
Listserviceprincipalapproleassignments — Active Directory List Service Principal App Role Assignments
/v1/serviceprincipals/{serviceprincipalid}/approleassignments

MCP Tools

active-directory-list-service-principals

Active Directory List Service Principals

read-only idempotent
active-directory-get-service-principal

Active Directory Get Service Principal

read-only idempotent
active-directory-list-service-principal

Active Directory List Service Principal App Role Assignments

read-only idempotent

Capability Spec

applications-service-principals.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Microsoft Graph Applications and Service Principals API — Service Principals
  description: 'Microsoft Graph Applications and Service Principals API — Service Principals. 3 operations. Lead operation:
    Active Directory List Service Principals. Self-contained Naftiko capability covering one Active Directory business surface.'
  tags:
  - Active Directory
  - Service Principals
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    ACTIVE_DIRECTORY_API_KEY: ACTIVE_DIRECTORY_API_KEY
capability:
  consumes:
  - type: http
    namespace: applications-service-principals
    baseUri: https://graph.microsoft.com/v1.0
    description: Microsoft Graph Applications and Service Principals API — Service Principals business capability. Self-contained,
      no shared references.
    resources:
    - name: servicePrincipals
      path: /servicePrincipals
      operations:
      - name: listserviceprincipals
        method: GET
        description: Active Directory List Service Principals
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: $filter
          in: query
          type: string
        - name: $select
          in: query
          type: string
        - name: $top
          in: query
          type: integer
        - name: $search
          in: query
          type: string
    - name: servicePrincipals-servicePrincipalId
      path: /servicePrincipals/{servicePrincipalId}
      operations:
      - name: getserviceprincipal
        method: GET
        description: Active Directory Get Service Principal
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: servicePrincipalId
          in: path
          type: string
          description: Service principal object ID
          required: true
    - name: servicePrincipals-servicePrincipalId-appRoleAssignments
      path: /servicePrincipals/{servicePrincipalId}/appRoleAssignments
      operations:
      - name: listserviceprincipalapproleassignments
        method: GET
        description: Active Directory List Service Principal App Role Assignments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: servicePrincipalId
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.ACTIVE_DIRECTORY_API_KEY}}'
  exposes:
  - type: rest
    namespace: applications-service-principals-rest
    port: 8080
    description: REST adapter for Microsoft Graph Applications and Service Principals API — Service Principals. One Spectral-compliant
      resource per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/serviceprincipals
      name: serviceprincipals
      description: REST surface for servicePrincipals.
      operations:
      - method: GET
        name: listserviceprincipals
        description: Active Directory List Service Principals
        call: applications-service-principals.listserviceprincipals
        with:
          $filter: rest.$filter
          $select: rest.$select
          $top: rest.$top
          $search: rest.$search
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/serviceprincipals/{serviceprincipalid}
      name: serviceprincipals-serviceprincipalid
      description: REST surface for servicePrincipals-servicePrincipalId.
      operations:
      - method: GET
        name: getserviceprincipal
        description: Active Directory Get Service Principal
        call: applications-service-principals.getserviceprincipal
        with:
          servicePrincipalId: rest.servicePrincipalId
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/serviceprincipals/{serviceprincipalid}/approleassignments
      name: serviceprincipals-serviceprincipalid-approleassignments
      description: REST surface for servicePrincipals-servicePrincipalId-appRoleAssignments.
      operations:
      - method: GET
        name: listserviceprincipalapproleassignments
        description: Active Directory List Service Principal App Role Assignments
        call: applications-service-principals.listserviceprincipalapproleassignments
        with:
          servicePrincipalId: rest.servicePrincipalId
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: applications-service-principals-mcp
    port: 9090
    transport: http
    description: MCP adapter for Microsoft Graph Applications and Service Principals API — Service Principals. One tool per
      consumed operation, routed inline through this capability's consumes block.
    tools:
    - name: active-directory-list-service-principals
      description: Active Directory List Service Principals
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: applications-service-principals.listserviceprincipals
      with:
        $filter: tools.$filter
        $select: tools.$select
        $top: tools.$top
        $search: tools.$search
      outputParameters:
      - type: object
        mapping: $.
    - name: active-directory-get-service-principal
      description: Active Directory Get Service Principal
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: applications-service-principals.getserviceprincipal
      with:
        servicePrincipalId: tools.servicePrincipalId
      outputParameters:
      - type: object
        mapping: $.
    - name: active-directory-list-service-principal
      description: Active Directory List Service Principal App Role Assignments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: applications-service-principals.listserviceprincipalapproleassignments
      with:
        servicePrincipalId: tools.servicePrincipalId
      outputParameters:
      - type: object
        mapping: $.