Skip to Content
Product Information
Author's profile photo Yash Agrawal

Creating Collaboration Using OAuth 2.0 Client Credentials in SAP Intelligent Product Design

Introduction

Using the Collaboration offering of SAP Intelligent Product Design (IPD); you can collaborate with internal and external participants, using documents, design models (2D and 3D), and product data (like BOM). For detailed documentation on OData APIs, you can refer to the product documentation here.

This blog provides you an insight on how to work with Collaboration via the OData APIs using OAuth 2.0 Client Credentials Authentication – Collaboration Capability API Reference.

Prerequisites

  • Register an OAuth client in SAP Cloud Platform cockpit for your subaccount with the subscription as cpdc and Authorization Grant as Client Credentials
    • Security > OAuth > Clients > Register New Client
  • Assign the required roles to oauth_client_<client_ID>
    • cpdc – CollaborationUser
    • mobiledocs – User

Steps

  1. Get access token; using the token endpoint and the client id secret generated
    • Token endpoint – https://oauthasservices-<tenantId>.<host>/oauth2/api/v1/token?grant_type=client_credentials
    • Sample POST call snippet from Postman
  2. Get X-CSRF-Token; using collaboration API and the access token generated
    • GET – /cpdc/odata/v1/
      Sample snippet from Postman
  3. Create Collaboration; using collaboration API, access token generated, and the X-CSRF-Token fetched
    • POST – /cpdc/odata/v1/CollaborationSet
      Sample snippet from Postman
  4. Add Participant to the Collaboration; using collaboration API, access token generated, X-CSRF-Token fetched and the collaboration id
    • POST – /cpdc/odata/v1/CollaborationSet(‘CollaborationId’)/ Contributors
      Sample snippet from Postman

Conclusion

Going through the steps in this blog you can create Collaborations and Add Participants to that Collaboration, using OAuth 2.0 Client Credentials Authentication flow in SAP IPD.

PS – Please share your feedback and write to me if you have any follow-up.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.