Microsoft · Capability

Microsoft Dynamics 365 REST API — Accounts

Microsoft Dynamics 365 REST API — Accounts. 5 operations. Lead operation: Microsoft List accounts. Self-contained Naftiko capability covering one Microsoft business surface.

Run with Naftiko MicrosoftAccounts

What You Can Do

GET
Listaccounts — Microsoft List accounts
/v1/accounts
POST
Createaccount — Microsoft Create an account
/v1/accounts
GET
Getaccount — Microsoft Get an account
/v1/accounts-accountid
PATCH
Updateaccount — Microsoft Update an account
/v1/accounts-accountid
DELETE
Deleteaccount — Microsoft Delete an account
/v1/accounts-accountid

MCP Tools

microsoft-list-accounts

Microsoft List accounts

read-only idempotent
microsoft-create-account

Microsoft Create an account

microsoft-get-account

Microsoft Get an account

read-only idempotent
microsoft-update-account

Microsoft Update an account

idempotent
microsoft-delete-account

Microsoft Delete an account

idempotent

Capability Spec

dynamics-365-accounts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Microsoft Dynamics 365 REST API — Accounts
  description: 'Microsoft Dynamics 365 REST API — Accounts. 5 operations. Lead operation: Microsoft List accounts. Self-contained
    Naftiko capability covering one Microsoft business surface.'
  tags:
  - Microsoft
  - Accounts
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MICROSOFT_API_KEY: MICROSOFT_API_KEY
capability:
  consumes:
  - type: http
    namespace: dynamics-365-accounts
    baseUri: https://{org}.api.crm.dynamics.com/api/data/v9.2
    description: Microsoft Dynamics 365 REST API — Accounts business capability. Self-contained, no shared references.
    resources:
    - name: accounts
      path: /accounts
      operations:
      - name: listaccounts
        method: GET
        description: Microsoft List accounts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createaccount
        method: POST
        description: Microsoft Create an account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: accounts({accountid})
      path: /accounts({accountid})
      operations:
      - name: getaccount
        method: GET
        description: Microsoft Get an account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: accountid
          in: path
          type: string
          required: true
      - name: updateaccount
        method: PATCH
        description: Microsoft Update an account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: accountid
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteaccount
        method: DELETE
        description: Microsoft Delete an account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: accountid
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.MICROSOFT_API_KEY}}'
  exposes:
  - type: rest
    namespace: dynamics-365-accounts-rest
    port: 8080
    description: REST adapter for Microsoft Dynamics 365 REST API — Accounts. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/accounts
      name: accounts
      description: REST surface for accounts.
      operations:
      - method: GET
        name: listaccounts
        description: Microsoft List accounts
        call: dynamics-365-accounts.listaccounts
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createaccount
        description: Microsoft Create an account
        call: dynamics-365-accounts.createaccount
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/accounts-accountid
      name: accounts-accountid
      description: REST surface for accounts({accountid}).
      operations:
      - method: GET
        name: getaccount
        description: Microsoft Get an account
        call: dynamics-365-accounts.getaccount
        with:
          accountid: rest.accountid
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updateaccount
        description: Microsoft Update an account
        call: dynamics-365-accounts.updateaccount
        with:
          accountid: rest.accountid
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteaccount
        description: Microsoft Delete an account
        call: dynamics-365-accounts.deleteaccount
        with:
          accountid: rest.accountid
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: dynamics-365-accounts-mcp
    port: 9090
    transport: http
    description: MCP adapter for Microsoft Dynamics 365 REST API — Accounts. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: microsoft-list-accounts
      description: Microsoft List accounts
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: dynamics-365-accounts.listaccounts
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-create-account
      description: Microsoft Create an account
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: dynamics-365-accounts.createaccount
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-get-account
      description: Microsoft Get an account
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: dynamics-365-accounts.getaccount
      with:
        accountid: tools.accountid
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-update-account
      description: Microsoft Update an account
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: dynamics-365-accounts.updateaccount
      with:
        accountid: tools.accountid
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: microsoft-delete-account
      description: Microsoft Delete an account
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: dynamics-365-accounts.deleteaccount
      with:
        accountid: tools.accountid
      outputParameters:
      - type: object
        mapping: $.