I am working on automation in being able to submit Create Non-Employee Request’s via logic apps. When generating a PAT and making it into an access token. Using the v3 API works with the bearer token. However, said token is only good for so long. I can see that it is possible to set up a request token. This is where I am struggling is setting up a request token using the API management. I am not sure if I just have something misconfigured, or maybe my lack of knowledge on how exactly API management works.
In order to generate this, I also need a code from the Authorize Code grant? I can run the get command for my tenant in form-encoded, however I am not sure where the response code is located in the response.
Therefore I can not generate the refresh token. Which I would assume the refresh token is what I would then use to call for authentication as a bearer token for the call to create a non-employee request.
Is this the correct process for that? Or am I missing something?