Adding user to the Azure AD group from a Slack form - azure

I'm interested in triggering a process where based on a Slack form, user is added to Azure AD group. There is an API method for Azure to add a user to a group so from AD side I believe that shouldn't be big of an issue, but I'm interested in Slack part. Would Slack be able to send an API call with a user email address to an API endpoint?
So theoretically speaking it would work like this:
Someone fills out Slack form with a User field
Slack will pick up an email address of a user
Slack will somehow send this information to a MS Graph and fill out Email Address in an API Call
`
{
"#odata.id": "https://graph.microsoft.com/v1.0/users/EmailAddressFromSlack"
}
`
4. User is added to a Azure Group
I'm kind of a beginner so I'm sorry if some details or info is not clear and I'm actually not sure if something like this can be done but if you have any ideas how to proceed, I'm open to suggestions.
Thank you in advance.

Related

Service account to send Docusign eSignature requests

I've signed up for a developer account with Docusign. We have about 15 users that access a Windows Forms page from another program where they fill out the proper information and click a button that calls a NET Core Web API which creates an envelope and sends to the signer. Those 15 users don't have accounts in Docusign and don't need them to. I want to use one admin or service account that will send and receive the emails, but I can't figure out how to do this.
I used my name for the developer account and now all my (test) Docusign emails show they are from me and once the signer signs, my email receives the signed documents. I've tried creating another "Admin" account, but I don't see any way to associate that user as an "API User". When I try using that user's GUID as the ImpersonatedUserID, my RequestJWTUserToken request comes back with "consent_required". But, when I go to the link I just get an error with "The client id provided is not registered with Docusign".
Everything in the Web API is working perfectly except for the emails showing they are from me and then the signed docs coming back to my email. This should be an easy thing to change the user, but apparently it's not, or I just can't figure it out.
You were on your way to fix this, but didn't follow through.
Create new user (you did it)
Find the new userId (you did)
Update JRequestJWTUserToken (you did)
Consent error - expected, the new user did not consent.
Obtain consent. You need to have a URL built correctly like this to do this:
https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature%20impersonation&client_id=7c2b8d7e-xxxx-xxxx-xxxx-cda8a50dd73f&redirect_uri=http://example.com/callback/
Once you do 5, you need to log in with the same new user account you created (you may be automatically logged in with your original developer account, so log out) and provide consent.
Then step 4 will work just fine.
https://developers.docusign.com/platform/auth/consent/obtaining-individual-consent/

How we can get onboard id on basis of stripe account ID?

I want to integrate another link from stripe on our backend dashboard for onboarding/linking existing "Standard" accounts.
I just want to create a dynamic onboarding account link like https://connect.stripe.com/oauth/authorize?redirect_uri=https://connect.stripe.com/hosted/oauth&client_id='client_id'&state='onboard_id'&response_type=code&scope=read_write&stripe_user[country]=US via API
Can anyone please help me to find out the way like how we can get above link in response of API?
I have already tried to check with below link https://stripe.com/docs/api/account_links/create
If by "account ID" you mean the client_id query parameter, then it can be found in your Stripe dashboard at the bottom of the Connect settings page. I don't think this can be retrieved with the API, but this ID won't change so you can grab it from the dashboard and store it on your end to reuse it later.

How to use Azure ADB2C signup flow with custom subscription plans options?

I have a scenario and for what I believe is a common scenario for many websites :)
I have a website that uses Nextjs for frontend and asp.net core as backend. It uses Azure ADB2C for managing its users.
Now When the user is registering, I will collect some basic details which would be done through the userflows in Azure ADB2C.
Before the user creation is completed, I want to come back to my website to allow the user to select the subscription option and let the user click on subscribe button.
Based on this, there will be a call to third party payment gateway service like stripe/RazorPay... which takes over and allows the user to complete payment.
The payment gateway would send the success/failure notification back to my website which I will use to decide to proceed to complete user creation or discard the creation process.
Using ADB2C seems to be quite a big task with custom policies :)
Need help/suggestions/links
Is it possible for us to come back to my website from ADB2C in between the registering process? I see an option using Custom policies with REST call, but will that really help? This is not just a REST call.
OR
Is it possible for me to let the user first choose the subscription option and then pass on that data to the ADB2C userflow. Not sure if we can pass data that way to the signup userflow. if you have any link that does that please share it with me.
The second option seems to be more easy if I have a way to send some input to the signup flow.
With custom policies, it is possible to extend the signup screen by adding subscription options.
Then call a REST API to the payment gateway.
This will return to B2C.
If all is good, write the user data to B2C.
If not, display an error message and discard the data.

Azure API Management product subscription tracking

I am using Azure API Management for managing our APIs. Its containing product and all. Now I also want to catch some of the customer information into my database.
So my question is : "Is there anyway such that whenever someone is subscribing any product, my API will trigger?"
What I want to do is I will create an API which will fetch the details from Azure via REST API for all subscriptions and I want to call (auto trigger) that API whenever someone subscribe any product successfully. I know we can set the Approval workflow, we can send notification email also to any specific email id, but can we call any HTTP request?
Also if anyone have more idea about Developer portal then please share. (can we customize it, till what level, how, etc.)
Thanks in Advance..
One way is to put an Event Grid system topic on the resource group containing API Management service with
filter for Resource Write Success
subject filter / Subject begins with /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.ApiManagement/service/{apiManagementService}/subscriptions
and forward to Azure Function or WebHook - basically filter for activities logged as Subscribe to product or Update subscription on the resource.

Node and Microsoft Teams API

I'm building a Node only application that reads logs in the background and based on an event being read will send a message to a Teams channel directly.
I've been having quite a few issues getting a Graph API access token valid through Username and password.
I have been able to get a Graph API access token with client secret and tenant id which represents access
"without a user". Now that does not allow me to post a message in a channel as I would need to have access "on behalf of a user".
API => https://graph.microsoft.com/v1.0/teams/{team-id}/channels/{channel-id}/messages .
Would there be another way of achieving this? Webhook/Connectors?
Thank you!
There's a few different ways you can post to a teams channel, you can set up like you said an http webhook, where you could call it to post into a channel https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using
You can use power automate (flow) or logic apps to post messages as the flowbot, or you can write a bot/ use the bot framework to register a bot that can post to teams, called proactive messaging: https://learn.microsoft.com/en-us/microsoftteams/platform/resources/bot-v3/bot-conversations/bots-conv-proactive
As for trying to use graph with application permissions, that's not possible, at least for the moment.

Resources