Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
gregorw
Active Contributor

Context and possible options


Right now, I'm involved in a Side-by-Side Extension Product development. The application is implemented using the SAP Cloud Application Programming Model (CAP) using the NodeJS runtime. The documents maintained in the application need to be approved by a second person (approver) after a specific step. To provide the approver a seamless experience I see these options:

  • Integrate into the SAP S/4HANA on Premise "My Inbox" app

  • Integrate into SAP Task Center service

  • Integrate into Microsoft Outlook

  • Integrate into Microsoft Teams

  • Send a mail


The first option to integrate into the "My Inbox" app requires the implementation of a custom task provider class as nicely described by harish.vyas in his post Integrating 3rd Party Workflow to Fiori My Inbox.

Update, 14th May 2021: I found another option to integrate into the "My Inbox". You can implement a TCM (task consumption model)-compliant OData adapter as described in the blog post How to implement an OData provider for My Inbox from lena.grothaus and the SAP Note: 2304317 - How to implement an OData provider for Task Gateway/My Inbox.

The SAP Task Center service isn't yet available. According to the SAP TechEd 2020 session Central Workflow Inbox as a Key Intelligent Enterprise Quality [DEV112] by georgi.mladenov and ivan.vasev the GA is planned for Q2/2021. My question SAP Task Center - Add tasks from partner applications was answered by ivan.mirisola. The integration is possible using the SAP Workflow Service.

While composing this post I've re-discovered the blog post Integrating SAP Cloud Platform Workflow with Microsoft Outlook by harald.schubert. It describes in great detail how to leverage Adaptive Cards for SAP Workflow service approvals in Outlook.

Integration to Microsoft Teams


For the moment I give the Microsoft Teams option a try. First, I thought that building a Microsoft Teams Chatbot that can send proactive notifications to users might be the way to go. But even after I found this nice tutorial video Proactive messages in Microsoft Teams bots (JavaScript/Typescript) with its corresponding GitHub repository this way was too cumbersome.

During my research I've found the app Approvals in Microsoft Teams. From there the solution was just a link away: Microsoft Teams approvals with custom connectors. It seems to be possible to trigger a new approval from a Power Automate Flow and send the approval result back via a custom connector. That's the Architecture I've came up with:


 

As the bookshop-demo application already is setup for API access it was quite easy to setup security using authentication type "OAuth 2.0" with Identity Provider "Generic Oauth 2":


You find the needed Client ID and Client Secret in the credentials when you've followed my description in API access. The authorizationUrl and tokenUrl end up in the Swagger definition:
  "securityDefinitions": {
"undefined": {
"type": "oauth2",
"flow": "accessCode",
"authorizationUrl": "https://subaccount.authentication.eu10.hana.ondemand.com/oauth/authorize",
"tokenUrl": "https://subaccount.authentication.eu10.hana.ondemand.com/oauth/token",
"scopes": {}
}
}

For the connector I've defined several actions. Here you see the one for the approval. The action provides the parameters that can be filled in the flow:


After establishing the connection, I started to create this flow:


For the final result please check out this demo video:


Final thoughts


The setup was straight forward. I would think that with a combination of mraepple#content:blogposts from mraepple it should be possible to achieve even SSO from Microsoft Teams to the CAP App. Right now, other users use the connection that I've established. So I will be the user stored in the change history. For this scenario I would prefer the OAuth2 Client Credentials Flow. But that is not yet supported. You can vote at Add support for OAuth2 Client Credentials auth flow in Custom Connectors Security for it.

This is the result when searching for SAP connectors:



The question that came to my mind was then: Haven't there been announcements about a partnership between Microsoft and SAP? OK, Microsoft Teams and SAP BTP were not in the focus for the announcement: SAP partners with Microsoft for first-in-market cloud migration offerings in October 20, 2019. But in the announcement "SAP and Microsoft expand partnership and integrate Microsoft Teams across solutions January 22, 2021" it's front and center.

On the SAP Road Map Explorer (S-User required) I can see quite a list regarding SAP Cloud for Customer. But I can't find any other products. 3 months after the announcement I would expect more. Where is the promised integration scenarios between SAP S/4HANA and Microsoft Teams that thomas.saueressig mentioned in the LinkedIn post Microsoft and SAP: Expanding Our Partnership? Seems we have to wait until the announcements at SAPPHIRE NOW 2021 starting 2nd June 2021.
11 Comments
Labels in this area