Source:
<code>private void validateAcquireTokenRequest(final AuthenticationRequest authenticationRequest) throws AuthenticationException { final URL authorityUrl = StringExtensions.getUrl(authenticationRequest.getAuthority()); if (authorityUrl == null) { throw new AuthenticationException( ADALError.DEVELOPER_AUTHORITY_IS_NOT_VALID_URL); } if (mTokenCacheAccessor != null) { <START> mTokenCacheAccessor.setAuthRequest(authenticationRequest); <END> } Telemetry.getInstance().startEvent(authenticationRequest.getTelemetryRequestId(), EventStrings.AUTHORITY_VALIDATION_EVENT); APIEvent apiEvent = new APIEvent(EventStrings.AUTHORITY_VALIDATION_EVENT); if (mAuthContext.getValidateAuthority()) { try { validateAuthority(authorityUrl); apiEvent.setValidationStatus(EventStrings.AUTHORITY_VALIDATION_SUCCESS); } catch (AuthenticationException ex) { apiEvent.setValidationStatus(EventStrings.AUTHORITY_VALIDATION_FAILURE); throw ex; } finally { Telemetry.getInstance().stopEvent(authenticationRequest.getTelemetryRequestId(), apiEvent, EventStrings.AUTHORITY_VALIDATION_EVENT); } } else { apiEvent.setValidationStatus(EventStrings.AUTHORITY_VALIDATION_NOT_DONE); Telemetry.getInstance().stopEvent(authenticationRequest.getTelemetryRequestId(), apiEvent, EventStrings.AUTHORITY_VALIDATION_EVENT); } if (canSwitchToBroker(authenticationRequest) && !authenticationRequest.isSilent()) { verifyBrokerRedirectUri(authenticationRequest); } }</code><technical_language>mTokenCacheAccessor [](start = 12, length = 19) set telemetry request id in constructor create token cache accessor? Request id remains AcquireTokenRequest, right? #Closed</technical_language>

Target:
private void validateAcquireTokenRequest(final AuthenticationRequest authenticationRequest) throws AuthenticationException { final URL authorityUrl = StringExtensions.getUrl(authenticationRequest.getAuthority()); if (authorityUrl == null) { throw new AuthenticationException( ADALError.DEVELOPER_AUTHORITY_IS_NOT_VALID_URL); } Telemetry.getInstance().startEvent(authenticationRequest.getTelemetryRequestId(), EventStrings.AUTHORITY_VALIDATION_EVENT); APIEvent apiEvent = new APIEvent(EventStrings.AUTHORITY_VALIDATION_EVENT); apiEvent.setCorrelationId(authenticationRequest.getCorrelationId().toString()); apiEvent.setRequestId(authenticationRequest.getTelemetryRequestId()); if (mAuthContext.getValidateAuthority()) { try { validateAuthority(authorityUrl, authenticationRequest.getCorrelationId()); apiEvent.setValidationStatus(EventStrings.AUTHORITY_VALIDATION_SUCCESS); } catch (AuthenticationException ex) { apiEvent.setValidationStatus(EventStrings.AUTHORITY_VALIDATION_FAILURE); throw ex; } finally { Telemetry.getInstance().stopEvent(authenticationRequest.getTelemetryRequestId(), apiEvent, EventStrings.AUTHORITY_VALIDATION_EVENT); } } else { apiEvent.setValidationStatus(EventStrings.AUTHORITY_VALIDATION_NOT_DONE); Telemetry.getInstance().stopEvent(authenticationRequest.getTelemetryRequestId(), apiEvent, EventStrings.AUTHORITY_VALIDATION_EVENT); } final BrokerProxy.SwitchToBroker canSwitchToBrokerFlag = mBrokerProxy.canSwitchToBroker(); if (canSwitchToBrokerFlag != BrokerProxy.SwitchToBroker.CANNOT_SWITCH_TO_BROKER && mBrokerProxy.verifyUser(authenticationRequest.getLoginHint(), authenticationRequest.getUserId()) && !authenticationRequest.isSilent()) { if (canSwitchToBrokerFlag == BrokerProxy.SwitchToBroker.NEED_PERMISSIONS_TO_SWITCH_TO_BROKER) { throw new UsageAuthenticationException( ADALError.DEVELOPER_BROKER_PERMISSIONS_MISSING, "Broker related permissions are missing for GET_ACCOUNTS."); } verifyBrokerRedirectUri(authenticationRequest); } }