Pass extra parameters in ADAL return URL - azure

I am using ADAL to authenticate a web app registered in Azure. Basically I am following this link
Is there any way I can pass additional parameters to CatchCode function. For example, lets say I need to provide CatchCode with ID of the currently selected item in database.
Any idea?

In your sign-in request URL, there's a state querystring parameter which gets returned along with the response. You can use this to pass the information your application needs when a user is returned back to your application after signing in. You can read more about this here: https://msdn.microsoft.com/en-us/library/azure/dn645542.aspx.

Related

What is the "Resource" when setting up a call to REST API from ADF with Managed Indentity

I have created an Azure Function App and I can call it from browser with a URL similar to this:
https://myfunctionblahblh.appserviceenvironment.net/api/names/Peter/TGIF?code=my_function_app_key_Goes_Here
Now I want to call it from my ADF pipeline: So I dropped a Web activity and set it up like this so far:
So my question is what is the "Resource" that it is asking for? Also in the URL that for company reasons I have blacked out, imagine I have copied the URL of the function I pasted above, is that correct ?
The Resource field is where you specify the uri for the service that you want to send the token to. In the case of authenticating with managed identities, you will want to send it to "https://management.azure.com/". However, if your function is already authenticating with the "code" query string parameter, you may be able to set the Authentication field to "None".

User Info from JWT Kogito

I understand the mechanism of OIDC in Kogito with the help of process-usertasks-with-security-oidc-quarkus example.
However, I have a question about user information. In the given example, the approved field is filled by a Query string. Is there any way to get user information in Kogito? If it doesn't have that feature, can it reflect from header to service?
The integration with the security context inside the Kogito app is something that is on the radar, see https://issues.redhat.com/browse/KOGITO-6162. That would ignore the query string and use the authenticated user. Perhaps, for now, you could create your own endpoint to retrieve the authenticated information as needed and mimic the same API call that is done in the generated endpoint.
I figure out a temporary fix that problem with help of written Custom Service when using Kogito with Quarkus.
https://quarkus.io/guides/security-jwt
JWT Injection can call from the Service layer when used with Kogito.
It is also possible to propagate user identity to other workflow items with internally tagged process variables.

Azure AD B2C verification link with dynamic redirect uri & response type

I'm currently implementing custom mail verification for B2C following the sample found on github https://github.com/yoelhor/aadb2c-verification-link
When generating the link I would like to pick up the values for redirect_uri and response_type from the original request instead of defining it in appsettings. Is there a way to pass both query parameters on to the mail app?
I've hit this as well, making something similar for password reset. As far as I can tell, those values are not available from claim resolvers, so you can't get them. Unless you use custom query parameters which duplicate the values.

Enter a valid URI error in Azure Logic Apps

I am currently trying out Azure Logic Apps and am now trying to create
a first simple flow that acquires data from an external REST API.
I'm using FRED, a hosted Node-Red instance, to create an REST API end-point.
In FRED you use https://x_y.fred.sensetecnic.com/api/hello to access my mock API (where x_y is my user name).
Accessing "https://x_y.fred.sensetecnic.com/api/hello" in a browser returns the intended data as specified in the Node-Red flow. Same thing goes when accessing
"https://x_y.fred.sensetecnic.com/api/hello" using GET in Postman (then adding two required Headers, required by FRED).
The strange thing is that in my Azure Logic App, I am not able to even save the flow with my URI stated as "https://x_y.fred.sensetecnic.com/api/hello". It states "Enter a valid URI". I enter the headers as was required.
So I can get to the REST API directly from a browser or using Postman, but are not able to access it from within an Azure Logic App.
I test the problem is there is a special characters _ in your URI. You could have a try if you delete _ then it won't state error.
So you coudl Initialize a variable to store your name x_y, then insert the variable in the URI. The flow would be like this. If you don't find the name in Dynamic content, you could use variables('name') this expression to insert it.
With this way the GET method will run correctly.

DocuSign - Granting Consent - Redirect URI Variable

I have been following the DocuSign documentation to have a user "grant consent" for an application to user a DocuSign user account. I got that working. Now I am trying to make some adjustments to the url that sends a user to DocuSign, and then redirects the user back to my application.
This works for me right now:
https://account-d.docusign.com/oauth/auth?response_type=code&scope=impersonation&client_id=XXXXXX&redirect_uri=http://localhost:8080/DocuSignCallBack
What is want to do:
https://account-d.docusign.com/oauth/auth?response_type=code&scope=impersonation&client_id=XXXXXX&redirect_uri=http://localhost:8080/DocuSignCallBack?variableName=ABC123
(Where 'ABC123' is dynamic)
In short - I want to pass a dynamic value in the redirect URL so that when I get the callback, I still have the value. My problem: When try to pass the variable, it doesn't work. DocuSign complains that the Redirect URL isn't configured - so I adjusted the DocuSign Redirect URL for that client to include the '?variableName=' on the end - I got the same error.
My Question: Can I pass a dynamic value to DocuSign in the redirect_uri, and get that value back when I receive the callback? How can I adjust the configuration at DocuSign to allow a variable in the URL?
You cannot pass dynamic variable in redirect_uri, it should exactly match what has been configured in your IntegratorKey. To pass anything dynamic, you can use state parameter, whatever value you will set in state while calling DocuSign URL, DocuSign will pass exactly same value in the response after authenticating the user in the response. The Request URL may look like below:
https://account-d.docusign.com/oauth/auth?response_type=code&scope=impersonation&client_id=XXXXXX&redirect_uri=http://localhost:8080/DocuSignCallBack&state=variableName_ABC123
Treat this state parameter for the dynamic variable.

Resources