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: $.