Skip to content

Commit

Permalink
Communication/common new TeamsPhoneUser identifier (#32704)
Browse files Browse the repository at this point in the history
* copy previous stable swagger unchanged for baseline commit

* add teamsextensionuser

* add new optional phone number properties

* fix comment

* resourceId is a required property
  • Loading branch information
DominikMe authored Mar 7, 2025
1 parent af57dae commit 71e34b5
Show file tree
Hide file tree
Showing 2 changed files with 242 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
{
"swagger": "2.0",
"info": {
"title": "Communication",
"description": "Communication Services API common types.",
"version": "2025-03-15-preview"
},
"paths": {},
"definitions": {
"CommunicationErrorResponse": {
"description": "The Communication Services error.",
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"description": "The Communication Services error.",
"$ref": "#/definitions/CommunicationError"
}
}
},
"CommunicationError": {
"description": "The Communication Services error.",
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"description": "The error code."
},
"message": {
"type": "string",
"description": "The error message."
},
"target": {
"type": "string",
"readOnly": true,
"description": "The error target."
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/CommunicationError"
},
"readOnly": true,
"description": "Further details about specific errors that led to this error."
},
"innererror": {
"x-ms-client-name": "innerError",
"readOnly": true,
"$ref": "#/definitions/CommunicationError",
"description": "The inner error if any."
}
}
},
"CommunicationCloudEnvironmentModel": {
"description": "The cloud that the identifier belongs to.",
"type": "string",
"enum": [
"public",
"dod",
"gcch"
],
"x-ms-enum": {
"name": "CommunicationCloudEnvironmentModel",
"modelAsString": true
}
},
"CommunicationIdentifierModelKind": {
"description": "The identifier kind, for example 'communicationUser' or 'phoneNumber'.",
"type": "string",
"enum": [
"unknown",
"communicationUser",
"phoneNumber",
"microsoftTeamsUser",
"microsoftTeamsApp",
"teamsExtensionUser"
],
"x-ms-enum": {
"name": "CommunicationIdentifierModelKind",
"modelAsString": true
}
},
"CommunicationIdentifierModel": {
"description": "Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value.",
"type": "object",
"properties": {
"kind": {
"$ref": "#/definitions/CommunicationIdentifierModelKind",
"description": "The identifier kind. Only required in responses."
},
"rawId": {
"type": "string",
"description": "Raw Id of the identifier. Optional in requests, required in responses."
},
"communicationUser": {
"$ref": "#/definitions/CommunicationUserIdentifierModel",
"description": "The communication user."
},
"phoneNumber": {
"$ref": "#/definitions/PhoneNumberIdentifierModel",
"description": "The phone number."
},
"microsoftTeamsUser": {
"$ref": "#/definitions/MicrosoftTeamsUserIdentifierModel",
"description": "The Microsoft Teams user."
},
"microsoftTeamsApp": {
"$ref": "#/definitions/MicrosoftTeamsAppIdentifierModel",
"description": "The Microsoft Teams application."
},
"teamsExtensionUser": {
"$ref": "#/definitions/TeamsExtensionUserIdentifierModel",
"description": "The Microsoft Teams Extension user."
}
}
},
"CommunicationUserIdentifierModel": {
"description": "A user that got created with an Azure Communication Services resource.",
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"description": "The Id of the communication user."
}
}
},
"PhoneNumberIdentifierModel": {
"description": "A phone number.",
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string",
"description": "The phone number, usually in E.164 format."
},
"isAnonymous": {
"type": "boolean",
"description": "True if the phone number is anonymous. By default false if missing. If the phone number is anonymous, the value will be the string 'anonymous'."
},
"assertedId": {
"type": "string",
"description": "The asserted Id of the phone number. An asserted Id gets generated when the same phone number joins the same call more than once."
}
}
},
"MicrosoftTeamsUserIdentifierModel": {
"description": "A Microsoft Teams user.",
"type": "object",
"required": [
"userId"
],
"properties": {
"userId": {
"type": "string",
"description": "The Id of the Microsoft Teams user. If not anonymous, this is the Entra ID object Id of the user."
},
"isAnonymous": {
"type": "boolean",
"description": "True if the Microsoft Teams user is anonymous. By default false if missing."
},
"cloud": {
"$ref": "#/definitions/CommunicationCloudEnvironmentModel",
"description": "The cloud that the Microsoft Teams user belongs to. By default 'public' if missing."
}
}
},
"MicrosoftTeamsAppIdentifierModel": {
"description": "A Microsoft Teams application.",
"type": "object",
"required": [
"appId"
],
"properties": {
"appId": {
"type": "string",
"description": "The Id of the Microsoft Teams application."
},
"cloud": {
"$ref": "#/definitions/CommunicationCloudEnvironmentModel",
"description": "The cloud that the Microsoft Teams application belongs to. By default 'public' if missing."
}
}
},
"TeamsExtensionUserIdentifierModel": {
"description": "A Microsoft Teams Phone user who is using a Communication Services resource to extend their Teams Phone set up.",
"type": "object",
"required": [
"userId",
"tenantId",
"resourceId"
],
"properties": {
"userId": {
"type": "string",
"description": "The Id of the Microsoft Teams Extension user, i.e. the Entra ID object Id of the user."
},
"tenantId": {
"type": "string",
"description": "The tenant Id of the Microsoft Teams Extension user."
},
"resourceId": {
"type": "string",
"description": "The Communication Services resource Id."
},
"cloud": {
"$ref": "#/definitions/CommunicationCloudEnvironmentModel",
"description": "The cloud that the Microsoft Teams Extension user belongs to. By default 'public' if missing."
}
}
}
},
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
}
}
8 changes: 8 additions & 0 deletions specification/communication/data-plane/Common/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ input-file:
- stable/2023-11-15/common.json
```

### Tag: package-2025-03-15-preview
These settings apply only when `--tag=package-2025-03-15-preview` is specified on the command line.

```yaml $(tag) == 'package-2025-03-15-preview'
input-file:
- preview/2025-03-15-preview/common.json
```

---

# Code Generation
Expand Down

0 comments on commit 71e34b5

Please sign in to comment.