-
Notifications
You must be signed in to change notification settings - Fork 46
revert function key append, update HTTP request methods, Fixes AB#3430779 #2820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the need to pass Azure Function keys when calling Lab APIs, switching to certificate token-based authentication in headers. Additionally, it updates HTTP request methods from PUT/DELETE to POST for several Lab API endpoints and improves error messages in test utilities.
- Removed function key retrieval logic and associated parameters from all Lab API classes
- Changed HTTP methods from PUT/DELETE to POST for ResetApi, EnablePolicyApi, DisablePolicyApi, and DeleteDeviceApi
- Updated error messages to be more descriptive and include context (e.g., package names)
- Cleaned up unused imports and exception handling related to LabApiException
- Re-enabled previously ignored tests that now work with the updated authentication
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| uiautomationutilities/src/main/java/com/microsoft/identity/client/ui/automation/utils/AdbShellUtils.java | Enhanced error message to include package name when installation fails |
| testutils/src/main/java/com/microsoft/identity/internal/testutils/labutils/PolicyHelper.java | Removed function key retrieval, simplified API construction, removed unused imports and LabApiException handling |
| testutils/src/main/java/com/microsoft/identity/internal/testutils/labutils/LabUserHelper.java | Removed function key retrieval logic and simplified API initialization for temp user creation and password reset |
| testutils/src/main/java/com/microsoft/identity/internal/testutils/labutils/LabResetHelper.java | Removed function key retrieval, simplified API construction, and removed LabApiException catch blocks |
| testutils/src/main/java/com/microsoft/identity/internal/testutils/labutils/LabDeviceHelper.java | Removed function key retrieval and simplified DeleteDeviceApi construction |
| labapi/src/main/java/com/microsoft/identity/internal/test/labapi/api/ResetApi.java | Removed Azure function code parameters, changed HTTP method from PUT to POST, cleaned up imports |
| labapi/src/main/java/com/microsoft/identity/internal/test/labapi/api/EnablePolicyApi.java | Removed Azure function code parameters and query string code appending, changed HTTP method from PUT to POST |
| labapi/src/main/java/com/microsoft/identity/internal/test/labapi/api/DisablePolicyApi.java | Removed Azure function code parameters and query string code appending, changed HTTP method from PUT to POST |
| labapi/src/main/java/com/microsoft/identity/internal/test/labapi/api/DeleteDeviceApi.java | Removed Azure function code parameters, changed HTTP method from DELETE to POST, cleaned up imports |
| labapi/src/main/java/com/microsoft/identity/internal/test/labapi/api/CreateTempUserApi.java | Removed Azure function code parameters and query string code appending, simplified constructor |
| LabApiUtilities/src/test/com/microsoft/identity/labapi/utilities/client/LabClientTest.java | Re-enabled previously ignored tests for password reset, policy enable, and policy disable |
| LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/constants/LabConstants.java | Changed ResetOperation constants from capitalized to lowercase ("MFA"→"mfa", "Password"→"password") |
| LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/client/LabClient.java | Removed function key retrieval throughout, simplified API construction, added access token setup for reset/policy operations |
|
✅ Work item link check complete. Description contains link AB#3430779 to an Azure Boards work item. |
|
✅ Work item link check complete. Description contains link AB#3430779 to an Azure Boards work item. |
| final DeleteDeviceApi deleteDeviceApi = new DeleteDeviceApi(); | ||
|
|
||
| try { | ||
| final CustomSuccessResponse successResponse = deleteDeviceApi.apiDeleteDeviceDelete( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, when is CustomSuccessResponse expected as a result vs a general string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These Response classes are generated code, from a few years ago, they map to a particular json schema that lab was sending at one point. In the case of delete Device, that schema is no longer there due to bypassing the msidlabs layer, it's just sending us a string. This can should probably be changed on lab's side, but i don't really think such a change is worth it as it may cause another outage.
…430779 (#2407) Lab is now back online, we can un-ignore some tests AzureAD/microsoft-authentication-library-common-for-android#2820 [AB#3430779](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3430779)
We no longer need to pass the functions keys when calling lab api, just having the certificate token in headers is enough when making the request. All Lab APIs are now working again, needed to update their http request methods as well, all should use POST.
https://identitydivision.visualstudio.com/Engineering/_build/results?buildId=1560386&view=results
https://identitydivision.visualstudio.com/Engineering/_build/results?buildId=1560092&view=results
AB#3430779, 3429582