diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index f67c725954aff..8e83ca8345c7c 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -68,7 +68,7 @@ com.azure:azure-code-customization-parent;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-communication-callautomation;1.1.0;1.2.0-beta.1
com.azure:azure-communication-callingserver;1.0.0-beta.4;1.0.0-beta.5
com.azure:azure-communication-chat;1.3.14;1.4.0
-com.azure:azure-communication-common;1.2.14;2.0.0-beta.2
+com.azure:azure-communication-common;1.2.14;1.3.0-beta.2
com.azure:azure-communication-common-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-communication-email;1.0.8;1.1.0-beta.1
com.azure:azure-communication-identity;1.5.0;1.6.0-beta.1
diff --git a/sdk/communication/azure-communication-common-perf/pom.xml b/sdk/communication/azure-communication-common-perf/pom.xml
index fbf9d7a43e15f..32636151ab915 100644
--- a/sdk/communication/azure-communication-common-perf/pom.xml
+++ b/sdk/communication/azure-communication-common-perf/pom.xml
@@ -28,7 +28,7 @@
com.azure
azure-communication-common
- 2.0.0-beta.2
+ 1.3.0-beta.2
com.azure
diff --git a/sdk/communication/azure-communication-common/CHANGELOG.md b/sdk/communication/azure-communication-common/CHANGELOG.md
index 3e3c97dd9a3ba..ec74fc06b7139 100644
--- a/sdk/communication/azure-communication-common/CHANGELOG.md
+++ b/sdk/communication/azure-communication-common/CHANGELOG.md
@@ -1,10 +1,12 @@
# Release History
-## 2.0.0-beta.2 (Unreleased)
+## 1.3.0-beta.2 (Unreleased)
### Features Added
+- Added support for a new communication identifier `MicrosoftTeamsAppIdentifier`.
### Breaking Changes
+- Introduction of `MicrosoftTeamsAppIdentifier` is a breaking change. It will impact any code that previously depended on the use of UnknownIdentifier with rawIDs starting with `28:orgid:`, `28:dod:`, or `28:gcch:`.
### Bugs Fixed
diff --git a/sdk/communication/azure-communication-common/README.md b/sdk/communication/azure-communication-common/README.md
index b4ca9f4dd536e..148bc335eccc3 100644
--- a/sdk/communication/azure-communication-common/README.md
+++ b/sdk/communication/azure-communication-common/README.md
@@ -51,7 +51,7 @@ add the direct dependency to your project as follows.
com.azure
azure-communication-common
- 2.0.0-beta.1
+ 1.3.0-beta.2
```
[//]: # ({x-version-update-end})
diff --git a/sdk/communication/azure-communication-common/pom.xml b/sdk/communication/azure-communication-common/pom.xml
index 91c450930fe59..c58c84ad7ab1e 100644
--- a/sdk/communication/azure-communication-common/pom.xml
+++ b/sdk/communication/azure-communication-common/pom.xml
@@ -13,7 +13,7 @@
com.azure
azure-communication-common
jar
- 2.0.0-beta.2
+ 1.3.0-beta.2
Microsoft Azure common library for communication service client
diff --git a/sdk/communication/azure-communication-common/src/main/java/com/azure/communication/common/CommunicationIdentifier.java b/sdk/communication/azure-communication-common/src/main/java/com/azure/communication/common/CommunicationIdentifier.java
index aac5e4a3e93b2..74e2506da9cfe 100644
--- a/sdk/communication/azure-communication-common/src/main/java/com/azure/communication/common/CommunicationIdentifier.java
+++ b/sdk/communication/azure-communication-common/src/main/java/com/azure/communication/common/CommunicationIdentifier.java
@@ -11,17 +11,11 @@ public abstract class CommunicationIdentifier {
static final String PHONE_NUMBER_PREFIX = "4:";
- static final String BOT_PREFIX = "28:";
+ static final String TEAMS_APP_PUBLIC_CLOUD_PREFIX = "28:orgid:";
- static final String BOT_PUBLIC_CLOUD_PREFIX = "28:orgid:";
+ static final String TEAMS_APP_DOD_CLOUD_PREFIX = "28:dod:";
- static final String BOT_DOD_CLOUD_PREFIX = "28:dod:";
-
- static final String BOT_DOD_CLOUD_GLOBAL_PREFIX = "28:dod-global:";
-
- static final String BOT_GCCH_CLOUD_PREFIX = "28:gcch:";
-
- static final String BOT_GCCH_CLOUD_GLOBAL_PREFIX = "28:gcch-global:";
+ static final String TEAMS_APP_GCCH_CLOUD_PREFIX = "28:gcch:";
static final String TEAMS_USER_ANONYMOUS_PREFIX = "8:teamsvisitor:";
@@ -58,9 +52,6 @@ public static CommunicationIdentifier fromRawId(String rawId) {
}
final String[] segments = rawId.split(":");
if (segments.length != 3) {
- if (segments.length == 2 && rawId.startsWith(BOT_PREFIX)) {
- return new MicrosoftBotIdentifier(segments[1], false, CommunicationCloudEnvironment.PUBLIC);
- }
return new UnknownIdentifier(rawId);
}
@@ -77,16 +68,12 @@ public static CommunicationIdentifier fromRawId(String rawId) {
return new MicrosoftTeamsUserIdentifier(suffix, false).setCloudEnvironment(CommunicationCloudEnvironment.GCCH);
} else if (ACS_USER_PREFIX.equals(prefix) || SPOOL_USER_PREFIX.equals(prefix) || ACS_USER_DOD_CLOUD_PREFIX.equals(prefix) || ACS_USER_GCCH_CLOUD_PREFIX.equals(prefix)) {
return new CommunicationUserIdentifier(rawId);
- } else if (BOT_GCCH_CLOUD_GLOBAL_PREFIX.equals(prefix)) {
- return new MicrosoftBotIdentifier(suffix, false, CommunicationCloudEnvironment.GCCH);
- } else if (BOT_PUBLIC_CLOUD_PREFIX.equals(prefix)) {
- return new MicrosoftBotIdentifier(suffix, true, CommunicationCloudEnvironment.PUBLIC);
- } else if (BOT_DOD_CLOUD_GLOBAL_PREFIX.equals(prefix)) {
- return new MicrosoftBotIdentifier(suffix, false, CommunicationCloudEnvironment.DOD);
- } else if (BOT_GCCH_CLOUD_PREFIX.equals(prefix)) {
- return new MicrosoftBotIdentifier(suffix, true, CommunicationCloudEnvironment.GCCH);
- } else if (BOT_DOD_CLOUD_PREFIX.equals(prefix)) {
- return new MicrosoftBotIdentifier(suffix, true, CommunicationCloudEnvironment.DOD);
+ } else if (TEAMS_APP_PUBLIC_CLOUD_PREFIX.equals(prefix)) {
+ return new MicrosoftTeamsAppIdentifier(suffix, CommunicationCloudEnvironment.PUBLIC);
+ } else if (TEAMS_APP_GCCH_CLOUD_PREFIX.equals(prefix)) {
+ return new MicrosoftTeamsAppIdentifier(suffix, CommunicationCloudEnvironment.GCCH);
+ } else if (TEAMS_APP_DOD_CLOUD_PREFIX.equals(prefix)) {
+ return new MicrosoftTeamsAppIdentifier(suffix, CommunicationCloudEnvironment.DOD);
}
return new UnknownIdentifier(rawId);
diff --git a/sdk/communication/azure-communication-common/src/main/java/com/azure/communication/common/MicrosoftBotIdentifier.java b/sdk/communication/azure-communication-common/src/main/java/com/azure/communication/common/MicrosoftBotIdentifier.java
deleted file mode 100644
index e4644932f3e92..0000000000000
--- a/sdk/communication/azure-communication-common/src/main/java/com/azure/communication/common/MicrosoftBotIdentifier.java
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.communication.common;
-
-import com.azure.core.util.CoreUtils;
-
-/**
- * Communication identifier for Microsoft Bot
- */
-public final class MicrosoftBotIdentifier extends CommunicationIdentifier {
- private final String botId;
- private final boolean isResourceAccountConfigured;
- private boolean rawIdSet = false;
-
- private final CommunicationCloudEnvironment cloudEnvironment;
-
- /**
- * Creates a MicrosoftBotIdentifier object
- *
- * @param botId botId The unique Microsoft app ID for the bot as registered with the Bot Framework.
- * @param cloudEnvironment the cloud environment in which this identifier is created.
- * @param isResourceAccountConfigured set this to true if the bot is tenantized. It is false if the bot is global and no resource account is configured.
- * @throws IllegalArgumentException thrown if botId parameter fail the validation.
- */
- public MicrosoftBotIdentifier(String botId, boolean isResourceAccountConfigured, CommunicationCloudEnvironment cloudEnvironment) {
- if (CoreUtils.isNullOrEmpty(botId)) {
- throw new IllegalArgumentException("The initialization parameter [botId] cannot be null or empty.");
- }
- this.botId = botId;
- this.cloudEnvironment = cloudEnvironment;
- this.isResourceAccountConfigured = isResourceAccountConfigured;
- generateRawId();
- }
-
- /**
- * Creates a MicrosoftBotIdentifier object
- *
- * @param botId Id of the Microsoft bot.
- * @throws IllegalArgumentException thrown if botId parameter fail the validation.
- */
- public MicrosoftBotIdentifier(String botId) {
- this(botId, true, CommunicationCloudEnvironment.PUBLIC);
- }
-
- /**
- * Creates a MicrosoftBotIdentifier object
- *
- * @param botId Id of the Microsoft bot.
- * @param isResourceAccountConfigured set this to true if the bot is tenantized. It is false if the bot is global and no resource account is configured.
- * @throws IllegalArgumentException thrown if botId parameter fail the validation.
- */
- public MicrosoftBotIdentifier(String botId, boolean isResourceAccountConfigured) {
- this(botId, isResourceAccountConfigured, CommunicationCloudEnvironment.PUBLIC);
- }
-
- /**
- * Get bot Id
- * @return bot Id of the Microsoft bot.
- */
- public String getBotId() {
- return this.botId;
- }
-
- /**
- * @return True if the bot is tenantized. It is False if the bot is global and no resource account is configured.
- */
- public boolean isResourceAccountConfigured() {
- return this.isResourceAccountConfigured;
- }
-
- /**
- * Get cloud environment of the bot identifier
- *
- * @return cloud environment in which this identifier is created
- */
- public CommunicationCloudEnvironment getCloudEnvironment() {
- return cloudEnvironment;
- }
-
- /**
- * Set full id of the identifier
- * RawId is the encoded format for identifiers to store in databases or as stable keys in general.
- *
- * @param rawId full id of the identifier
- * @return MicrosoftBotIdentifier object itself
- */
- @Override
- public MicrosoftBotIdentifier setRawId(String rawId) {
- super.setRawId(rawId);
- rawIdSet = true;
- return this;
- }
-
- @Override
- public boolean equals(Object that) {
- if (this == that) {
- return true;
- }
-
- if (!(that instanceof MicrosoftBotIdentifier)) {
- return false;
- }
-
- return ((MicrosoftBotIdentifier) that).getRawId().equals(getRawId());
- }
-
- @Override
- public int hashCode() {
- return getRawId().hashCode();
- }
-
- private void generateRawId() {
- if (!rawIdSet) {
- if (!this.isResourceAccountConfigured) {
- if (cloudEnvironment.equals(CommunicationCloudEnvironment.DOD)) {
- super.setRawId(BOT_DOD_CLOUD_GLOBAL_PREFIX + this.botId);
- } else if (cloudEnvironment.equals(CommunicationCloudEnvironment.GCCH)) {
- super.setRawId(BOT_GCCH_CLOUD_GLOBAL_PREFIX + this.botId);
- } else {
- super.setRawId(BOT_PREFIX + this.botId);
- }
- } else if (cloudEnvironment.equals(CommunicationCloudEnvironment.DOD)) {
- super.setRawId(BOT_DOD_CLOUD_PREFIX + this.botId);
- } else if (cloudEnvironment.equals(CommunicationCloudEnvironment.GCCH)) {
- super.setRawId(BOT_GCCH_CLOUD_PREFIX + this.botId);
- } else {
- super.setRawId(BOT_PUBLIC_CLOUD_PREFIX + this.botId);
- }
- }
- }
-}
diff --git a/sdk/communication/azure-communication-common/src/main/java/com/azure/communication/common/MicrosoftTeamsAppIdentifier.java b/sdk/communication/azure-communication-common/src/main/java/com/azure/communication/common/MicrosoftTeamsAppIdentifier.java
new file mode 100644
index 0000000000000..1525a699d4c4a
--- /dev/null
+++ b/sdk/communication/azure-communication-common/src/main/java/com/azure/communication/common/MicrosoftTeamsAppIdentifier.java
@@ -0,0 +1,99 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.communication.common;
+
+import com.azure.core.util.CoreUtils;
+
+/**
+ * Communication identifier for Microsoft Teams Application
+ */
+public final class MicrosoftTeamsAppIdentifier extends CommunicationIdentifier {
+ private final String appId;
+
+ private final CommunicationCloudEnvironment cloudEnvironment;
+
+ /**
+ * Creates a MicrosoftTeamsAppIdentifier object
+ *
+ * @param appId ID of the Microsoft Teams Application.
+ * @param cloudEnvironment the cloud environment in which this identifier is created.
+ * @throws IllegalArgumentException thrown if appId parameter fails the validation.
+ */
+ public MicrosoftTeamsAppIdentifier(String appId, CommunicationCloudEnvironment cloudEnvironment) {
+ if (CoreUtils.isNullOrEmpty(appId)) {
+ throw new IllegalArgumentException("The initialization parameter [appId] cannot be null or empty.");
+ }
+ this.appId = appId;
+ this.cloudEnvironment = cloudEnvironment;
+ generateRawId();
+ }
+
+ /**
+ * Creates a MicrosoftTeamsAppIdentifier object
+ *
+ * @param appId ID of the Microsoft Teams Application.
+ * @throws IllegalArgumentException thrown if appId parameter fails the validation.
+ */
+ public MicrosoftTeamsAppIdentifier(String appId) {
+ this(appId, CommunicationCloudEnvironment.PUBLIC);
+ }
+
+ /**
+ * Get application ID
+ * @return ID of the Microsoft Teams Application.
+ */
+ public String getAppId() {
+ return this.appId;
+ }
+
+ /**
+ * Get cloud environment of the application identifier
+ *
+ * @return cloud environment in which this identifier is created.
+ */
+ public CommunicationCloudEnvironment getCloudEnvironment() {
+ return cloudEnvironment;
+ }
+
+ /**
+ * Set full ID of the identifier
+ * RawId is the encoded format for identifiers to store in databases or as stable keys in general.
+ *
+ * @param rawId full ID of the identifier.
+ * @return MicrosoftTeamsAppIdentifier object itself.
+ */
+ @Override
+ protected MicrosoftTeamsAppIdentifier setRawId(String rawId) {
+ super.setRawId(rawId);
+ return this;
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (this == that) {
+ return true;
+ }
+
+ if (!(that instanceof MicrosoftTeamsAppIdentifier)) {
+ return false;
+ }
+
+ return ((MicrosoftTeamsAppIdentifier) that).getRawId().equals(getRawId());
+ }
+
+ @Override
+ public int hashCode() {
+ return getRawId().hashCode();
+ }
+
+ private void generateRawId() {
+ if (cloudEnvironment.equals(CommunicationCloudEnvironment.DOD)) {
+ super.setRawId(TEAMS_APP_DOD_CLOUD_PREFIX + this.appId);
+ } else if (cloudEnvironment.equals(CommunicationCloudEnvironment.GCCH)) {
+ super.setRawId(TEAMS_APP_GCCH_CLOUD_PREFIX + this.appId);
+ } else {
+ super.setRawId(TEAMS_APP_PUBLIC_CLOUD_PREFIX + this.appId);
+ }
+ }
+}
diff --git a/sdk/communication/azure-communication-common/src/test/java/com/azure/communication/common/CommunicationIdentifierTests.java b/sdk/communication/azure-communication-common/src/test/java/com/azure/communication/common/CommunicationIdentifierTests.java
index 72261951dc271..b4c492b1fde46 100644
--- a/sdk/communication/azure-communication-common/src/test/java/com/azure/communication/common/CommunicationIdentifierTests.java
+++ b/sdk/communication/azure-communication-common/src/test/java/com/azure/communication/common/CommunicationIdentifierTests.java
@@ -18,22 +18,18 @@ public void defaultCloudIsPublicForMicrosoftTeamsUserIdentifier() {
}
@Test
- public void exceptionThrownForMicrosoftBotWithNoId() {
+ public void exceptionThrownForMicrosoftTeamsUserWithNoId() {
assertThrows(IllegalArgumentException.class, () -> {
new MicrosoftTeamsUserIdentifier("");
});
}
@Test
- public void defaultCloudIsPublicForMicrosoftBotIdentifier() {
+ public void defaultCloudIsPublicForMicrosoftTeamsAppIdentifier() {
assertEquals(CommunicationCloudEnvironment.PUBLIC,
- new MicrosoftBotIdentifier(userId, false).setRawId(fullId).getCloudEnvironment());
+ new MicrosoftTeamsAppIdentifier(userId).getCloudEnvironment());
}
- @Test
- public void defaultIsResourceAccountConfiguredIsTrueForMicrosoftBotIdentifier() {
- assertTrue(new MicrosoftBotIdentifier(userId).setRawId(fullId).isResourceAccountConfigured());
- }
@Test
public void rawIdTakesPrecedenceInEqualityCheck() {
// Teams users
@@ -86,13 +82,13 @@ public void rawIdTakesPrecedenceInEqualityCheck() {
assertEquals(new PhoneNumberIdentifier("+14255550123"),
new PhoneNumberIdentifier("+override").setRawId("4:+14255550123"));
- // Bots
- assertEquals(new MicrosoftBotIdentifier("45ab2481-1c1c-4005-be24-0ffb879b1130", false, CommunicationCloudEnvironment.PUBLIC),
- new MicrosoftBotIdentifier("45ab2481-1c1c-4005-be24-0ffb879b1130", false, CommunicationCloudEnvironment.PUBLIC));
- assertNotEquals(new MicrosoftBotIdentifier("45ab2481-1c1c-4005-be24-0ffb879b1130", false, CommunicationCloudEnvironment.PUBLIC)
- .setRawId("Raw Id"),
- new MicrosoftBotIdentifier("45ab2481-1c1c-4005-be24-0ffb879b1130", false, CommunicationCloudEnvironment.PUBLIC)
- .setRawId("Another Raw Id"));
+ // Teams Applications
+ assertEquals(new MicrosoftTeamsAppIdentifier("45ab2481-1c1c-4005-be24-0ffb879b1130", CommunicationCloudEnvironment.PUBLIC),
+ new MicrosoftTeamsAppIdentifier("45ab2481-1c1c-4005-be24-0ffb879b1130", CommunicationCloudEnvironment.PUBLIC));
+ assertNotEquals(new MicrosoftTeamsAppIdentifier("45ab2481-1c1c-4005-be24-0ffb879b1130", CommunicationCloudEnvironment.PUBLIC),
+ new MicrosoftTeamsAppIdentifier("55ab2481-1c1c-4005-be24-0ffb879b1130", CommunicationCloudEnvironment.PUBLIC));
+ assertNotEquals(new MicrosoftTeamsAppIdentifier("45ab2481-1c1c-4005-be24-0ffb879b1130", CommunicationCloudEnvironment.PUBLIC),
+ new MicrosoftTeamsAppIdentifier("45ab2481-1c1c-4005-be24-0ffb879b1130", CommunicationCloudEnvironment.DOD));
}
@Test
@@ -107,12 +103,9 @@ public void getRawIdOfIdentifier() {
assertRawId(new MicrosoftTeamsUserIdentifier("45ab2481-1c1c-4005-be24-0ffb879b1130", false), "8:orgid:45ab2481-1c1c-4005-be24-0ffb879b1130");
assertRawId(new MicrosoftTeamsUserIdentifier("45ab2481-1c1c-4005-be24-0ffb879b1130", true), "8:teamsvisitor:45ab2481-1c1c-4005-be24-0ffb879b1130");
assertRawId(new MicrosoftTeamsUserIdentifier("45ab2481-1c1c-4005-be24-0ffb879b1130", true).setRawId("8:orgid:legacyFormat"), "8:orgid:legacyFormat");
- assertRawId(new MicrosoftBotIdentifier("45ab2481-1c1c-4005-be24-0ffb879b1130", false, CommunicationCloudEnvironment.PUBLIC), "28:45ab2481-1c1c-4005-be24-0ffb879b1130");
- assertRawId(new MicrosoftBotIdentifier("01234567-89ab-cdef-0123-456789abcdef", false, CommunicationCloudEnvironment.GCCH), "28:gcch-global:01234567-89ab-cdef-0123-456789abcdef");
- assertRawId(new MicrosoftBotIdentifier("01234567-89ab-cdef-0123-456789abcdef", false, CommunicationCloudEnvironment.DOD), "28:dod-global:01234567-89ab-cdef-0123-456789abcdef");
- assertRawId(new MicrosoftBotIdentifier("01234567-89ab-cdef-0123-456789abcdef", true, CommunicationCloudEnvironment.PUBLIC), "28:orgid:01234567-89ab-cdef-0123-456789abcdef");
- assertRawId(new MicrosoftBotIdentifier("01234567-89ab-cdef-0123-456789abcdef", true, CommunicationCloudEnvironment.GCCH), "28:gcch:01234567-89ab-cdef-0123-456789abcdef");
- assertRawId(new MicrosoftBotIdentifier("01234567-89ab-cdef-0123-456789abcdef", true, CommunicationCloudEnvironment.DOD), "28:dod:01234567-89ab-cdef-0123-456789abcdef");
+ assertRawId(new MicrosoftTeamsAppIdentifier("01234567-89ab-cdef-0123-456789abcdef", CommunicationCloudEnvironment.PUBLIC), "28:orgid:01234567-89ab-cdef-0123-456789abcdef");
+ assertRawId(new MicrosoftTeamsAppIdentifier("01234567-89ab-cdef-0123-456789abcdef", CommunicationCloudEnvironment.GCCH), "28:gcch:01234567-89ab-cdef-0123-456789abcdef");
+ assertRawId(new MicrosoftTeamsAppIdentifier("01234567-89ab-cdef-0123-456789abcdef", CommunicationCloudEnvironment.DOD), "28:dod:01234567-89ab-cdef-0123-456789abcdef");
assertRawId(new PhoneNumberIdentifier("+112345556789"), "4:+112345556789");
assertRawId(new PhoneNumberIdentifier("112345556789"), "4:112345556789");
assertRawId(new PhoneNumberIdentifier("otherFormat").setRawId("4:207ffef6-9444-41fb-92ab-20eacaae2768"), "4:207ffef6-9444-41fb-92ab-20eacaae2768");
@@ -135,12 +128,9 @@ public void createIdentifierFromRawId() {
assertIdentifier("8:gcch:45ab2481-1c1c-4005-be24-0ffb879b1130", new MicrosoftTeamsUserIdentifier("45ab2481-1c1c-4005-be24-0ffb879b1130", false).setCloudEnvironment(CommunicationCloudEnvironment.GCCH));
assertIdentifier("8:teamsvisitor:45ab2481-1c1c-4005-be24-0ffb879b1130", new MicrosoftTeamsUserIdentifier("45ab2481-1c1c-4005-be24-0ffb879b1130", true).setCloudEnvironment(CommunicationCloudEnvironment.PUBLIC));
assertIdentifier("8:orgid:legacyFormat", new MicrosoftTeamsUserIdentifier("legacyFormat", false).setCloudEnvironment(CommunicationCloudEnvironment.PUBLIC));
- assertIdentifier("28:45ab2481-1c1c-4005-be24-0ffb879b1130", new MicrosoftBotIdentifier("45ab2481-1c1c-4005-be24-0ffb879b1130", false, CommunicationCloudEnvironment.PUBLIC));
- assertIdentifier("28:gcch-global:01234567-89ab-cdef-0123-456789abcdef", new MicrosoftBotIdentifier("01234567-89ab-cdef-0123-456789abcdef", false, CommunicationCloudEnvironment.GCCH));
- assertIdentifier("28:dod-global:01234567-89ab-cdef-0123-456789abcdef", new MicrosoftBotIdentifier("01234567-89ab-cdef-0123-456789abcdef", false, CommunicationCloudEnvironment.DOD));
- assertIdentifier("28:orgid:01234567-89ab-cdef-0123-456789abcdef", new MicrosoftBotIdentifier("01234567-89ab-cdef-0123-456789abcdef", true, CommunicationCloudEnvironment.PUBLIC));
- assertIdentifier("28:gcch:01234567-89ab-cdef-0123-456789abcdef", new MicrosoftBotIdentifier("01234567-89ab-cdef-0123-456789abcdef", true, CommunicationCloudEnvironment.GCCH));
- assertIdentifier("28:dod:01234567-89ab-cdef-0123-456789abcdef", new MicrosoftBotIdentifier("01234567-89ab-cdef-0123-456789abcdef", true, CommunicationCloudEnvironment.DOD));
+ assertIdentifier("28:orgid:01234567-89ab-cdef-0123-456789abcdef", new MicrosoftTeamsAppIdentifier("01234567-89ab-cdef-0123-456789abcdef", CommunicationCloudEnvironment.PUBLIC));
+ assertIdentifier("28:gcch:01234567-89ab-cdef-0123-456789abcdef", new MicrosoftTeamsAppIdentifier("01234567-89ab-cdef-0123-456789abcdef", CommunicationCloudEnvironment.GCCH));
+ assertIdentifier("28:dod:01234567-89ab-cdef-0123-456789abcdef", new MicrosoftTeamsAppIdentifier("01234567-89ab-cdef-0123-456789abcdef", CommunicationCloudEnvironment.DOD));
assertIdentifier("4:+112345556789", new PhoneNumberIdentifier("+112345556789"));
assertIdentifier("4:112345556789", new PhoneNumberIdentifier("112345556789"));
assertIdentifier("4:207ffef6-9444-41fb-92ab-20eacaae2768", new PhoneNumberIdentifier("207ffef6-9444-41fb-92ab-20eacaae2768"));
@@ -168,9 +158,6 @@ public void rawIdStaysTheSameAfterConversionToIdentifierAndBack() {
assertRoundTrip("4:207ffef6-9444-41fb-92ab-20eacaae2768");
assertRoundTrip("4:207ffef6-9444-41fb-92ab-20eacaae2768_207ffef6-9444-41fb-92ab-20eacaae2768");
assertRoundTrip("4:+112345556789_207ffef6-9444-41fb-92ab-20eacaae2768");
- assertRoundTrip("28:45ab2481-1c1c-4005-be24-0ffb879b1130");
- assertRoundTrip("28:gcch-global:01234567-89ab-cdef-0123-456789abcdef");
- assertRoundTrip("28:dod-global:01234567-89ab-cdef-0123-456789abcdef");
assertRoundTrip("28:orgid:01234567-89ab-cdef-0123-456789abcdef");
assertRoundTrip("28:gcch:01234567-89ab-cdef-0123-456789abcdef");
assertRoundTrip("28:dod:01234567-89ab-cdef-0123-456789abcdef");