Retrieving Account Entity from REST Authentication

Howdy! I am currently working on a public api that would be callable from other unique servers that have correct authentication credentials. The main issue I have run into is that many of our micro flows use the Administration.Account entity to authenticate certain procedures that are only allowed for specific users. I want to include this functionality in our api but I’m not certain of how to retrieve the current account information from the Authorization header with Mendix’s basic Username and Password Authentication and then set it to the correct parameter to be used in our microflows. Is there any way to do this through the native basic authentication that comes with mendix? I’m hoping to avoid the client having to include their credentials in a header or in the body of the Rest call. I’m also hoping to avoid rewriting all of our microflows without the Account entity specifically for the sake of the api.  Thanks in advance!
1 answers

If I understand it correctly, you need to retrieve the account which is consuming the REST service or which is used for the authentication of the REST service.

There is no need to retrieve the account information from the authorization header, you can directly retrieve the current account in the microflow, in this case it should return you the account which is using the underlying microflow on the REST service.