Disable session Entra ID

Hello everyone, I am setting up a workflow to disable an Entra ID session, and I have a question regarding the request step.

First, I need to make the following request to generate the token:
https://login.microsoftonline.com/<TENANT_ID>/oauth2/v2.0/token

Body:
client_id=<CLIENT_ID>
client_secret=<CLIENT_SECRET>
scope=https://graph.microsoft.com/.default
grant_type=client_credentials

Currently, my Client ID and Client Secret are stored in Parameter Storage; is it possible to retrieve the value from Parameter Storage and insert it into the request body?

Hi @guilherme_sec

Few different options for this, have you tried using the OOTB option for Azure Entra ID Client in the parameter storage? There’s more custom ways to do what you are trying to do, but I think this is the most straight forward path.

image

I don’t think it’s possible to reference values straight from the parameter storage for security purposes, like this {{$.parameter.secret}}). Are you trying to generate a token manually via a separate API call, or are you trying to use the native OAuth 2.0 authentication method inside the HTTP Request step for your Revoke Session call?

In my experience, you should be able to reference it straight from the HTTP Request options, in here:

I am already proceeding in this way.

The problem is in the request body; I need to pass a body to generate the token.

Body:
client_id=<CLIENT_ID>
client_secret=<CLIENT_SECRET>
scope=https://graph.microsoft.com/.default
grant_type=client_credentials

Thanks for providing those details.

Assuming everything in your parameter storage is setup correctly, this should work. The parameter storage itself is doing the call to get the token, so that should not be required in your call to revokeSignInSessions. Are you getting an error when running this call that makes you think it’s not working properly?

Hi @guilherme_sec

Please follow the below steps and let me know if this resolves your issue

  1. Create the below 2 parameters, one for Authentication and another one for Authorization.

a. Entra Token(Authentication):

image

b. Entra Scope (Authorization)

image

  1. Workflow

http step response:

Thanks,

Dinesh