Share via

CCF Data Connector - Pass Generated Access Token from POST API to Subsequent GET API in Azure CCP Connector

Fenil Savani 0 Reputation points
2026-05-13T12:17:11.7066667+00:00
  • We are developing a CCP connector in Azure and are facing an issue with API authentication flow implementation.

Scenario

  1. The first API endpoint is a POST request used to generate an access_token.
  • This API requires a secret key to be passed in the request body
  • It returns an access_token in the response
  1. The second API endpoint is a GET request used to fetch data.
  • This API requires the generated access_token to be passed in the request header
  • Header format:
  • Key: Authorization
  • Value: <generated_access_token>

Current Approach

  • We are trying to implement this using Auth Type: API Key.
  • Using this approach, we are able to successfully generate the access_token from the first API.

Issue Faced

  • The issue appears to be that the authentication configuration (auth) used for generating the access token in the first API call is also being applied to the second API request.
  • As a result, the second GET API request is also expecting the API key (secret key) in the request body, which is incorrect and causes the API call to fail.
  • The second API should only use the generated access_token in the request header and should not reuse the original API key authentication configuration.

Clarification Required We would like to understand:

  • How can we configure the connector so that the token generated from the POST API endpoint is used in the subsequent GET API request?
  • Specifically, how can we pass the generated access_token in the Authorization header for the second API request, while the first API uses the secret key in the request body?

Please help us understand the correct approach for handling this authentication flow in Azure CCP Data Connector development.

Microsoft Security | Microsoft Sentinel

1 answer

Sort by: Most helpful
  1. Konstantinos Lianos 425 Reputation points Student Ambassador
    2026-05-13T12:27:12.28+00:00

    Helo @Fenil Savani ,

    Based on the described authentication flow, this does not appear to be a standard API Key authentication scenario.

    The source API is using a two-step authentication process:

    The first API call is a POST request used only to generate an access_token.

    The second API call is a GET request used to fetch data, and it should use only the generated access_token in the Authorization header.

    Therefore, the secret key should only be used during the first token-generation request. It should not be reused or applied to the second GET request.

    The expected behavior should be:

    POST /token

    Body: secret_key

    Response:

    access_token

    Then:

    GET /data

    Authorization: <generated_access_token>

    The issue with using Auth Type: API Key is that the API key configuration may be treated as the main authentication method for the connector. As a result, the same authentication configuration can be applied to the following API calls as well. This is why the second GET request appears to expect the original secret key again, which is not the desired behavior.

    The correct approach is to treat this as a token-based authentication flow, not as a simple API Key flow.

    For Azure CCP Data Connector development, the recommended approach should be:

    Use a supported token-based authentication method, such as OAuth2 or JwtToken, if the API can support a standard token flow.

    Configure the connector so that it first calls the token endpoint, extracts the access_token from the response, and then uses that token in the Authorization header for the data collection request.

    If the API requires a custom secret key in the POST body and this cannot be mapped to the supported CCP authentication types, then a middleware component may be required.

    In that case, an Azure Function, Logic App, or similar service can handle the custom authentication flow. The middleware would generate the token, call the data API with the correct Authorization header, and then send the collected logs to Microsoft Sentinel.

    So, the key point is that the second GET request should not inherit the original API Key authentication configuration. It should only use the generated access_token.

    In summary, the current API Key approach is likely not suitable for this use case unless CCP supports separating the token-generation request from the data-collection request. The best next step is to confirm whether the API can support a standard OAuth2 client credentials or JwtToken flow. If not, a middleware-based implementation would be the safest and cleanest approach.

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.