Add provisionResourceAccountCredentials API to Common's DRCA, Fixes AB#3450074#3086
Add provisionResourceAccountCredentials API to Common's DRCA, Fixes AB#3450074#3086
Conversation
- Add provisionResourceAccountCredentials to DeviceRegistrationClientApplication - Add ProvisionResourceAccountCredentialsV0Parameters and V0Response - Rename protocol constant to PROVISION_RESOURCE_ACCOUNT_CREDENTIALS_V0 - Add IPPHONE_PROD and IPPHONE_DEBUG entries to AppRegistry - Add unit test for provisionResourceAccountCredentials - Make sdkType and sdkVersion required params Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
…hone Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
42ffda5 to
55711fb
Compare
|
✅ Work item link check complete. Description contains link AB#3450074 to an Azure Boards work item. |
|
❌ Work item link check failed. Description contains AB#3450074 but the Bot could not link it to an Azure Boards work item. Click here to learn more. |
There was a problem hiding this comment.
Pull request overview
Adds a new DRCA (DeviceRegistrationClientApplication) IPC surface to provision resource account credentials via broker, and expands the app allow-list to recognize Teams IP Phone (Sakurai) packages. This fits into Common’s device registration/broker IPC layer by introducing a new V0 protocol params/response pair and exposing a public Kotlin API to invoke it.
Changes:
- Added
provisionResourceAccountCredentials(...)toDeviceRegistrationClientApplication, returning anAccountRecord. - Introduced new V0 protocol parameter/response types and a new protocol constant string.
- Added Teams IP Phone prod/debug app entries to
AppRegistryand a new unit test + changelog entry.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| common/src/main/java/com/microsoft/identity/deviceregistration/api/DeviceRegistrationClientApplication.kt | Exposes new DRCA API and wires it to the controller/IPC protocol packer. |
| common4j/src/main/com/microsoft/identity/deviceregistration/java/protocol/parameters/ProvisionResourceAccountCredentialsV0Parameters.java | Defines the V0 wire parameters for the new broker IPC operation. |
| common4j/src/main/com/microsoft/identity/deviceregistration/java/protocol/response/ProvisionResourceAccountCredentialsV0Response.java | Defines the V0 wire response carrying the provisioned AccountRecord. |
| common4j/src/main/com/microsoft/identity/deviceregistration/java/protocol/DeviceRegistrationProtocolConstants.java | Adds/renames the protocol name constant used for the new operation. |
| common/src/main/java/com/microsoft/identity/common/internal/apps/AppRegistry.kt | Adds Teams IP Phone prod/debug apps to the authorized app registry. |
| common/src/test/java/com/microsoft/identity/deviceregistration/api/DeviceRegistrationClientApplicationTest.kt | Adds a unit test for the new DRCA API happy path. |
| changelog.txt | Documents the new API and AppRegistry additions under vNext. |
Comments suppressed due to low confidence (1)
common4j/src/main/com/microsoft/identity/deviceregistration/java/protocol/parameters/ProvisionResourceAccountCredentialsV0Parameters.java:81
- The public DRCA API requires
sdkTypeandsdkVersion, but the wire parameters model allows both to be null (@Nullable). This creates an inconsistent contract across layers and makes it easier to accidentally send incomplete IPC payloads. Align the nullability with the intended requirement (prefer@NonNullfor both), or explicitly document/handle null as a supported scenario (e.g., legacy callers).
…arams test - Remove unnecessary @jvmoverloads annotation (no default params) - Update KDoc to say 'required' instead of 'optional' for sdkType/sdkVersion - Change sdkType?.name to sdkType.name (non-null safe call redundant) - Add test verifying sdkType and sdkVersion are passed through to IPC params Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Adds the
provisionResourceAccountCredentialsIPC API toDeviceRegistrationClientApplication(DRCA) enabling OneAuth consumers to provision resource account credentials via the broker. Also adds Teams IP Phone (Sakurai) app entries toAppRegistry.Changes
New API:
provisionResourceAccountCredentialsprovisionResourceAccountCredentials(tenantId, raObjectId, correlationId, sdkType, sdkVersion)toDeviceRegistrationClientApplicationsdkType(SdkType) andsdkVersion(String) are required parametersAccountRecordfor the provisioned resource accountProtocol Files
ProvisionResourceAccountCredentialsV0Parameters— V0 wire params (correlationId, tenantId, raObjectId, sdkType, sdkVersion)ProvisionResourceAccountCredentialsV0Response— V0 wire response carryingAccountRecordPROVISION_RESOURCE_ACCOUNT_CREDENTIALS_V0AppRegistry
IPPHONE_PRODandIPPHONE_DEBUGentries for Teams IP Phone (Sakurai) devices using existing constants fromAuthenticationConstantsTests
provisionResourceAccountCredentials_returnsAccountRecordunit test toDeviceRegistrationClientApplicationTestFiles Changed
DeviceRegistrationClientApplication.ktprovisionResourceAccountCredentialsmethodProvisionResourceAccountCredentialsV0Parameters.javaProvisionResourceAccountCredentialsV0Response.javaDeviceRegistrationProtocolConstants.javaAppRegistry.ktDeviceRegistrationClientApplicationTest.ktchangelog.txtCompanion PR
Work Item
Fixes AB#3450074