Skip to content

Bug report: Impossible to create team when using application permissions #4916

Description

@MathijsVerbeeck

Priority

(Low) Something is a little off

Description

It is currently impossible to create a team when using application permissions. This is due to the application permissions request expecting a members property in the request body, and we currently do not demand this.

More information can be found on this URL: https://learn.microsoft.com/en-us/graph/api/team-post?view=graph-rest-1.0&tabs=http#examples

Steps to reproduce

  1. Login using application permissions
  2. Execute m365 teams team add --name 'TEST' --description 'TEST'

Expected results

Team being created or a prompt for members

Actual results

Error: Request failed with status code 400

Diagnostics

Request error:
{
  "url": "https://graph.microsoft.com/v1.0/teams",
  "status": 400,
  "statusText": "Bad Request",
  "headers": {
    "transfer-encoding": "chunked",
    "content-type": "application/json",
    "vary": "Accept-Encoding",
    "strict-transport-security": "max-age=31536000",
    "request-id": "51e35905-5bb0-4c3b-8616-df164c8099e3",
    "client-request-id": "51e35905-5bb0-4c3b-8616-df164c8099e3",
    "x-ms-ags-diagnostic": "{\"ServerInfo\":{\"DataCenter\":\"North Europe\",\"Slice\":\"E\",\"Ring\":\"4\",\"ScaleUnit\":\"003\",\"RoleInstance\":\"DB1PEPF0002D0AB\"}}",
    "date": "Tue, 23 May 2023 09:52:51 GMT",
    "connection": "close"
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions