arazzo: 1.0.1 info: title: Microsoft Teams Promote Team Member summary: List a team's members and promote an existing membership to owner. description: >- Promoting an existing member to owner requires resolving the membership id from the team roster. This workflow lists the team's members, branches on whether any members exist, and patches the supplied membership to grant the owner role. Every step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: teamsApi url: ../openapi/microsoft-teams-graph-api.yaml type: openapi workflows: - workflowId: promote-team-member summary: Resolve a membership from the roster and promote it to owner. description: >- Lists the team's members so the caller can resolve the membership id, then updates the supplied membership to the owner role. When the team has no members the flow ends. inputs: type: object required: - accessToken - teamId - membershipId properties: accessToken: type: string description: OAuth 2.0 bearer token with TeamMember.ReadWrite.All scope. teamId: type: string description: The unique identifier of the team. membershipId: type: string description: The membership id of the member to promote. steps: - stepId: listMembers description: >- List the team's members so the caller can confirm and resolve the membership to promote. operationId: listTeamMembers parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" - name: team-id in: path value: $inputs.teamId successCriteria: - condition: $statusCode == 200 outputs: members: $response.body#/value onSuccess: - name: membersExist type: goto stepId: promoteMember criteria: - context: $response.body condition: $.value.length > 0 type: jsonpath - name: noMembers type: end criteria: - context: $response.body condition: $.value.length == 0 type: jsonpath - stepId: promoteMember description: >- Patch the supplied membership to grant the owner role. operationId: updateTeamMember parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" - name: team-id in: path value: $inputs.teamId - name: membership-id in: path value: $inputs.membershipId requestBody: contentType: application/json payload: roles: - owner successCriteria: - condition: $statusCode == 200 outputs: roles: $response.body#/roles outputs: roles: $steps.promoteMember.outputs.roles