Hello @Mota, Antonio , thank you for reaching out. If I understand you correctly, you have registered a single application in AAD and for that App Registration, you have created multiple Client_Secrets each for a separate application code that would be referencing the same App Registration in AAD.
In such a setup, it is not possible to figure out which application code, actually initiated the request for the token, the reason being, in the request that the app code sends to AAD, would only have the client_id and one of the available client_secrets from the list of client_secrets you created. When this request reaches AAD, AAD would validate the request only by looking at the client_id and the client_secret and if those two are valid, AAD would issue you an access_token. AAD has no means to capture the information as to which app code of yours has fired this request and hence the access_token would only contain the name of the App Registration and the App_Id and
nothing else.
In case you would like to figure out from which code instance you received AAD received the request by looking into the access_token, in that case, you would have to create separate App_Registrations, and that App_Registrations name and App_id would be listed in the access_token under the app_displayName and appId keys
Hope this helps.
Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as an Answer; if the above response helped in answering your query.