Microsoft Teams API

Manage Microsoft Teams resources

Documentation

📖
Documentation
https://learn.microsoft.com/en-us/graph/overview
📖
Authentication
https://learn.microsoft.com/en-us/graph/auth/
📖
GettingStarted
https://learn.microsoft.com/en-us/graph/use-the-api
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/azure/
📖
APIReference
https://learn.microsoft.com/en-us/rest/api/?view=Azure
📖
Authentication
https://learn.microsoft.com/en-us/azure/active-directory/develop/
📖
Documentation
https://learn.microsoft.com/en-us/azure/ai-services/openai/
📖
APIReference
https://learn.microsoft.com/en-us/azure/ai-services/openai/reference
📖
GettingStarted
https://learn.microsoft.com/en-us/azure/ai-services/openai/quickstart
📖
Authentication
https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/managed-identity
📖
Documentation
https://learn.microsoft.com/en-us/azure/ai-services/
📖
APIReference
https://learn.microsoft.com/en-us/rest/api/cognitiveservices/
📖
Documentation
https://learn.microsoft.com/en-us/microsoftteams/platform/
📖
APIReference
https://learn.microsoft.com/en-us/graph/teams-concept-overview
📖
Documentation
https://learn.microsoft.com/en-us/onedrive/developer/
📖
APIReference
https://learn.microsoft.com/en-us/onedrive/developer/rest-api/
📖
Documentation
https://learn.microsoft.com/en-us/power-platform/admin/programmability-overview
📖
Documentation
https://learn.microsoft.com/en-us/bing/search-apis/
📖
APIReference
https://learn.microsoft.com/en-us/bing/search-apis/bing-web-search/reference/endpoints
📖
Documentation
https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service
📖
APIReference
https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-rest-endpoints
📖
GettingStarted
https://learn.microsoft.com/en-us/sharepoint/dev/apis/sharepoint-rest-graph
📖
Documentation
https://learn.microsoft.com/en-us/power-bi/developer/
📖
APIReference
https://learn.microsoft.com/en-us/rest/api/power-bi/
📖
Authentication
https://learn.microsoft.com/en-us/power-bi/developer/embedded/register-app
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/azure/devops/
📖
GettingStarted
https://learn.microsoft.com/en-us/azure/devops/integrate/how-to/call-rest-api
📖
Authentication
https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/authentication-guidance
📖
Documentation
https://learn.microsoft.com/en-us/rest/dynamics365/
📖
APIReference
https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/reference/about
📖
GettingStarted
https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/overview
📖
Authentication
https://learn.microsoft.com/en-us/power-apps/developer/data-platform/authenticate-oauth
📖
Documentation
https://learn.microsoft.com/en-us/linkedin/
📖
Authentication
https://learn.microsoft.com/en-us/linkedin/shared/authentication/getting-access
📖
APIReference
https://learn.microsoft.com/en-us/linkedin/shared/api-guide/concepts
📖
Documentation
https://learn.microsoft.com/en-us/azure/communication-services/
📖
APIReference
https://learn.microsoft.com/en-us/rest/api/communication/
📖
Documentation
https://learn.microsoft.com/en-us/entra/identity-platform/
📖
APIReference
https://learn.microsoft.com/en-us/graph/identity-network-access-overview
📖
GettingStarted
https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app
📖
Authentication
https://learn.microsoft.com/en-us/entra/identity-platform/v2-overview
📖
Documentation
https://learn.microsoft.com/en-us/outlook/
📖
GettingStarted
https://learn.microsoft.com/en-us/outlook/rest/get-started
📖
Documentation
https://learn.microsoft.com/en-us/graph/intune-concept-overview
📖
APIReference
https://learn.microsoft.com/en-us/graph/api/resources/intune-graph-overview
📖
Authentication
https://learn.microsoft.com/en-us/intune/intune-service/developer/intune-graph-apis

Specifications

Schemas & Data

Other Resources

🔗
SDKs
https://learn.microsoft.com/en-us/graph/sdks/sdks-overview
🔗
Graph Explorer
https://developer.microsoft.com/en-us/graph/graph-explorer
🔗
ChangeLog
https://learn.microsoft.com/en-us/graph/whats-new-overview
🔗
GraphQL
https://raw.githubusercontent.com/api-evangelist/microsoft/refs/heads/main/graphql/microsoft-graphql.md
🔗
SDKs
https://azure.microsoft.com/en-us/downloads/
🔗
Pricing
https://azure.microsoft.com/en-us/pricing/
🔗
Pricing
https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/
🔗
Pricing
https://azure.microsoft.com/en-us/pricing/details/cognitive-services/
🔗
SDKs
https://learn.microsoft.com/en-us/azure/ai-services/cognitive-services-apis-create-account-client-library
🔗
App Templates
https://learn.microsoft.com/en-us/microsoftteams/platform/samples/app-templates
🔗
SDKs
https://learn.microsoft.com/en-us/microsoftteams/platform/get-started/get-started-overview
🔗
Samples
https://github.com/OneDrive/samples
🔗
Power Apps API
https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/overview
🔗
Power Automate API
https://learn.microsoft.com/en-us/power-automate/web-api
🔗
Pricing
https://www.microsoft.com/en-us/bing/apis/pricing
🔗
Microsoft Graph Integration
https://learn.microsoft.com/en-us/graph/sharepoint-concept-overview
🔗
SDKs
https://learn.microsoft.com/en-us/power-bi/developer/embedded/
🔗
Samples
https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/rest/samples
🔗
SDKs
https://learn.microsoft.com/en-us/linkedin/shared/development-resources/api-clients
🔗
SDKs
https://learn.microsoft.com/en-us/azure/communication-services/concepts/sdk-options
🔗
Pricing
https://azure.microsoft.com/en-us/products/communication-services/#pricing
🔗
GitHub
https://github.com/Azure/Communication
🔗
Mail API Reference
https://learn.microsoft.com/en-us/graph/outlook-mail-concept-overview
🔗
Calendar API Reference
https://learn.microsoft.com/en-us/graph/outlook-calendar-concept-overview
🔗
SDKs
https://learn.microsoft.com/en-us/intune/intune-service/developer/app-sdk-get-started

OpenAPI Specification

microsoft-teams-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Microsoft Azure Cognitive Services Accounts Teams API
  description: APIs for vision, speech, language, and decision-making AI capabilities including Computer Vision, Text Analytics, and Translator services.
  version: '3.2'
  contact:
    name: Microsoft Azure Support
    url: https://azure.microsoft.com/en-us/support/
  termsOfService: https://www.microsoft.com/en-us/legal/terms-of-use
servers:
- url: https://{region}.api.cognitive.microsoft.com
  description: Azure Cognitive Services Regional Endpoint
  variables:
    region:
      default: eastus
      description: Azure region for the Cognitive Services resource
security:
- apiKey: []
tags:
- name: Teams
  description: Manage Microsoft Teams resources
paths:
  /teams:
    get:
      operationId: listTeams
      summary: Microsoft List teams
      description: List all teams in an organization.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/top'
      - $ref: '#/components/parameters/filter'
      - $ref: '#/components/parameters/select'
      responses:
        '200':
          description: Collection of teams
          content:
            application/json:
              schema:
                type: object
                properties:
                  '@odata.context':
                    type: string
                  '@odata.nextLink':
                    type: string
                  value:
                    type: array
                    items:
                      $ref: '#/components/schemas/Team'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createTeam
      summary: Microsoft Create a team
      description: Create a new team.
      tags:
      - Teams
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTeamRequest'
      responses:
        '202':
          description: Team creation accepted
          headers:
            Location:
              schema:
                type: string
              description: URL to poll for team creation status
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
  /teams/{team-id}:
    get:
      operationId: getTeam
      summary: Microsoft Get team
      description: Retrieve the properties and relationships of the specified team.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/teamId'
      - $ref: '#/components/parameters/select'
      responses:
        '200':
          description: Team object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updateTeam
      summary: Microsoft Update team
      description: Update the properties of the specified team.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/teamId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Team'
      responses:
        '204':
          description: Team updated successfully
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteTeam
      summary: Microsoft Delete team
      description: Delete a team. When deleted, Microsoft 365 groups are moved to a temporary container and can be restored within 30 days.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/teamId'
      responses:
        '204':
          description: Team deleted successfully
        '404':
          $ref: '#/components/responses/NotFound'
  /teams/{team-id}/channels:
    get:
      operationId: listChannels
      summary: Microsoft List channels
      description: Retrieve the list of channels in this team.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/teamId'
      - $ref: '#/components/parameters/top'
      - $ref: '#/components/parameters/filter'
      - $ref: '#/components/parameters/select'
      responses:
        '200':
          description: Collection of channels
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    type: array
                    items:
                      $ref: '#/components/schemas/Channel'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: createChannel
      summary: Microsoft Create channel
      description: Create a new channel in a team as specified in the request body.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/teamId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Channel'
      responses:
        '201':
          description: Channel created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Channel'
        '400':
          $ref: '#/components/responses/BadRequest'
  /teams/{team-id}/channels/{channel-id}/messages:
    get:
      operationId: listChannelMessages
      summary: Microsoft List channel messages
      description: Retrieve the list of messages (without the replies) in a channel of a team. To get the replies for a message, call the list message replies or the get message reply API.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/teamId'
      - $ref: '#/components/parameters/channelId'
      - $ref: '#/components/parameters/top'
      responses:
        '200':
          description: Collection of chat messages
          content:
            application/json:
              schema:
                type: object
                properties:
                  value:
                    type: array
                    items:
                      $ref: '#/components/schemas/ChatMessage'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: sendChannelMessage
      summary: Microsoft Send channel message
      description: Send a new chatMessage in the specified channel.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/teamId'
      - $ref: '#/components/parameters/channelId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatMessage'
      responses:
        '201':
          description: Message sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatMessage'
  /teams/{teamId}:
    get:
      operationId: getTeam
      summary: Microsoft Get a team
      description: Retrieve the properties and relationships of the specified team.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/teamId_2'
      responses:
        '200':
          description: Team details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team_2'
        '401':
          description: Unauthorized
        '404':
          description: Team not found
    patch:
      operationId: updateTeam
      summary: Microsoft Update a team
      description: Update the properties of a team.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/teamId_2'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTeamRequest'
      responses:
        '204':
          description: Team updated
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '404':
          description: Team not found
    delete:
      operationId: deleteTeam
      summary: Microsoft Delete a team
      description: Delete a team and its associated group.
      tags:
      - Teams
      parameters:
      - $ref: '#/components/parameters/teamId_2'
      responses:
        '204':
          description: Team deleted
        '401':
          description: Unauthorized
        '404':
          description: Team not found
components:
  schemas:
    UpdateTeamRequest:
      type: object
      properties:
        displayName:
          type: string
        description:
          type: string
        visibility:
          type: string
    Team_2:
      type: object
      properties:
        id:
          type: string
        displayName:
          type: string
        description:
          type: string
        isArchived:
          type: boolean
        webUrl:
          type: string
        visibility:
          type: string
          enum:
          - private
          - public
        funSettings:
          type: object
          properties:
            allowGiphy:
              type: boolean
            allowStickersAndMemes:
              type: boolean
        memberSettings:
          type: object
          properties:
            allowCreateUpdateChannels:
              type: boolean
            allowDeleteChannels:
              type: boolean
            allowAddRemoveApps:
              type: boolean
    Team:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the team
          readOnly: true
        displayName:
          type: string
          description: Name of the team
        description:
          type: string
          description: Optional description for the team
        internalId:
          type: string
          description: Unique ID for the team used in a few places such as the audit log
          readOnly: true
        isArchived:
          type: boolean
          description: Whether the team is in read-only mode
        visibility:
          type: string
          enum:
          - private
          - public
          description: Visibility of the group and team
        webUrl:
          type: string
          format: uri
          description: Hyperlink to the team in Microsoft Teams client
          readOnly: true
        createdDateTime:
          type: string
          format: date-time
          readOnly: true
        memberSettings:
          type: object
          properties:
            allowCreateUpdateChannels:
              type: boolean
            allowDeleteChannels:
              type: boolean
            allowAddRemoveApps:
              type: boolean
            allowCreateUpdateRemoveTabs:
              type: boolean
            allowCreateUpdateRemoveConnectors:
              type: boolean
        guestSettings:
          type: object
          properties:
            allowCreateUpdateChannels:
              type: boolean
            allowDeleteChannels:
              type: boolean
        messagingSettings:
          type: object
          properties:
            allowUserEditMessages:
              type: boolean
            allowUserDeleteMessages:
              type: boolean
            allowTeamMentions:
              type: boolean
            allowChannelMentions:
              type: boolean
        funSettings:
          type: object
          properties:
            allowGiphy:
              type: boolean
            giphyContentRating:
              type: string
              enum:
              - strict
              - moderate
            allowStickersAndMemes:
              type: boolean
            allowCustomMemes:
              type: boolean
    ODataError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code
            message:
              type: string
              description: Human-readable error message
            innerError:
              type: object
              properties:
                date:
                  type: string
                  format: date-time
                request-id:
                  type: string
                client-request-id:
                  type: string
    CreateTeamRequest:
      type: object
      required:
      - displayName
      properties:
        displayName:
          type: string
        description:
          type: string
        visibility:
          type: string
          enum:
          - private
          - public
    Channel:
      type: object
      properties:
        id:
          type: string
          description: Channel unique identifier
          readOnly: true
        displayName:
          type: string
          description: Channel name as it appears in Microsoft Teams
        description:
          type: string
          description: Optional textual description for the channel
        membershipType:
          type: string
          enum:
          - standard
          - private
          - shared
          description: Type of channel
        email:
          type: string
          format: email
          description: Email address for sending messages to the channel
          readOnly: true
        webUrl:
          type: string
          format: uri
          description: Hyperlink for the channel in Microsoft Teams
          readOnly: true
        createdDateTime:
          type: string
          format: date-time
          readOnly: true
    ChatMessage:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the message
          readOnly: true
        body:
          type: object
          properties:
            contentType:
              type: string
              enum:
              - text
              - html
            content:
              type: string
        from:
          type: object
          properties:
            user:
              type: object
              properties:
                id:
                  type: string
                displayName:
                  type: string
                userIdentityType:
                  type: string
        messageType:
          type: string
          enum:
          - message
          - chatEvent
          - typing
          - unknownFutureValue
          - systemEventMessage
          description: Type of chat message
        importance:
          type: string
          enum:
          - normal
          - high
          - urgent
        createdDateTime:
          type: string
          format: date-time
          readOnly: true
        lastModifiedDateTime:
          type: string
          format: date-time
          readOnly: true
        subject:
          type: string
          description: Subject of the chat message (only for channel messages)
        summary:
          type: string
          description: Summary text for push notifications and previews
        webUrl:
          type: string
          format: uri
          readOnly: true
  parameters:
    filter:
      name: $filter
      in: query
      required: false
      description: OData filter expression
      schema:
        type: string
    channelId:
      name: channel-id
      in: path
      required: true
      description: Unique identifier of the channel
      schema:
        type: string
    teamId:
      name: team-id
      in: path
      required: true
      description: Unique identifier of the team
      schema:
        type: string
    select:
      name: $select
      in: query
      required: false
      description: Comma-separated list of properties to include in the response
      schema:
        type: string
    top:
      name: $top
      in: query
      required: false
      description: Number of items to return (page size)
      schema:
        type: integer
        minimum: 1
    teamId_2:
      name: teamId
      in: path
      required: true
      description: Team unique identifier
      schema:
        type: string
  responses:
    Unauthorized:
      description: Unauthorized - authentication required or token expired
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ODataError'
    BadRequest:
      description: Bad request - invalid input or malformed request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ODataError'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ODataError'
  securitySchemes:
    apiKey:
      type: apiKey
      name: Ocp-Apim-Subscription-Key
      in: header
      description: Azure Cognitive Services subscription key
externalDocs:
  description: Azure AI Services Documentation
  url: https://learn.microsoft.com/en-us/azure/ai-services/