Master account pre pattern execution details are incorrect causing it to make additional API call to management.azure.com/subscriptions for Management groupDescriptionDuring Azure Discovery, an error may occur when processing Management Group (Master Account) service accounts. The discovery incorrectly triggers an additional REST API call to the Azure subscriptions endpoint using a Management Group ID as a Subscription ID, resulting in a failure. The error is caused by an incorrect evaluation of the is_master_account attribute during pre‑pattern execution in the Azure Service Account pattern. The pattern evaluates the value as a numeric boolean (0 or 1), whereas the discovery context actually provides the value as a string boolean ("true" or "false"). Due to this data type mismatch, the condition incorrectly evaluates to false, allowing execution of a step that should have been skipped for master accounts. This leads to an invalid API call and ultimately causes discovery to fail. Observed Error JAVASCRIPT_CODE_FAILURE: com.snc.sw.exception.CommandFailureException: Bad Cloud Request. Verify request parameters and ensure proper authentication. URL: https://management.azure.com/subscriptions/<master account id>?api-version=2020-01-01 Status: 400 Bad Request ErrorCode: InvalidSubscriptionId Response: The provided subscription identifier '<master account id>' is malformed or invalid. (script_include: AzureApiCommand; line 148) Steps to Reproduce 1) Configure an Azure Service Account for a Management Group (Master Account). 2) Run Azure Discovery using this service account. 3) During discovery: The Azure Service Account pattern reaches Step 5, which checks the is_master_account attribute.The pattern compares the value using a numeric boolean check (== 1). 4) Since the discovery context provides the value as a string ("true"), the condition evaluates incorrectly. 5) The pattern executes a step intended only for non‑master accounts. 6) An additional API call is made to: https://management.azure.com/subscriptions/<management_group_id> 7) Azure rejects the call because a Management Group ID is not a valid Subscription ID, resulting in a 400 Bad Request.WorkaroundUpdate the condition in the Azure Service Account pattern (Step 5) to compare the is_master_account attribute as a string boolean instead of a numeric boolean. Before Fix if ($service_account.is_master_account == 1) { // skip step } After Fix if ($service_account.is_master_account == "true") { // skip step } This ensures the evaluation aligns with the actual data type provided in the discovery context and prevents execution of the step for master accounts.Related Problem: PRB1990584