SAP Knowledge Base Article - Public

2936295 - How to create user by SAP Analytics Cloud User and Team Provisioning API

Symptom

 How to create user by SAP Analytics Cloud User and Team Provisioning API

Environment

SAP Analytics Cloud

Resolution

Using SAP Analytics Cloud User and Team Provisioning API, it is recommended toto follow this online document: 

If, for whatever reason, you prefer using SCIM1, you may use the following online document and follow the below sampled example:

Below is a sample which is using Postman to consume this API to create new user for SAC

1. Open Postman and execute "Post" request with URL:
   
    The URL is: <Token URL>?grant_type=client_credentials
    You can get token URL from System > Administration > App Integration tab.

    Here is a example of the URL: https://oauthasservices-XXXXX.X1.hana.ondemand.com/oauth2/api/v1/token?grant_type=client_credentials

    Here's the list of parameters needed to for this request:

   1) grant_type: client_credentials (generated directly after input above URL)
   2) Authorization tab:

         Basic Auth: create an OAuth client ID and password from SAC and input the ID & secret here. (How to create OAuth client)

   3) Headers tab:

         x-sap-sac-custom-auth :true
         Content-type: application/json

     Then get result like below and note down the access_token value:
                         {
                             "access_token": "xxxxxxxxxxxxxxxx",
                             "token_type": "Bearer",
                             "expires_in": 31104000,
                             "scope": ""
                          }

2. Execute "Get" request with URL  like:

   The URL is <TenantRUL>api/v1/scim/Users
   Here is an example of the URL: https://xxx.xx1.sapbusinessobjects.cloud/api/v1/scim/Users

    Here's the list of parameters needed for this request:

    1) Authorization tab:

        Bearer Token
        Token value:
access token value generated in step 1

    2)Headers tab:

         x-sap-sac-custom-auth:true
         x-csrf-token: fetch

    Then you can find x-csrf-token from Headers tab. Note down the value:
     x-csrf-token  xxxxxxxxx

3. Execute "POST" request use the URL:

   The URL is  <TenantRUL>api/v1/scim/Users
   Here is a example of the URL: https://xxx.xx1.sapbusinessobjects.cloud/api/v1/scim/Users

    Here's the list of parameters needed for this request:

    1) Authorization tab:

        Bearer Token
        Token value:
access token value generated in step 1

    2) Headers tab:

         x-csrf-token: xxxxxxxx (result in step 2)
         x-sap-sac-custom-auth: true
 
     In body > Raw, input the following sample code to create user, select "json" format:

     {
       "schemas": [
       "urn:ietf:params:scim:schemas:core:2.0:User",
       "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
       ],
       "userName":"xxxxxx@xxx.com",
       "name":
      {
         "givenName":"xxx",
         "familyName":"xxxx"
       }, 
       "displayName":"xxxx",
       "emails":[
       {
         "value":"xxxxxx@xxx.com",
         "type":"work",
         "primary":true
       }
       ],
       "roles":[],
       "groups":[],
       "urn:scim:schemas:extension:enterprise:1.0": {
       "manager": {
       "managerId": ""
       }
       }
     }

Note:

This sample includes an empty groups array. When creating user objects, you cannot use this array to do team assignment. You must use the /Groups endpoint to create or update team information.

See Also

Your feedback is important to help us improve our knowledge base.

Keywords

SAP Cloud for Planning, sc4p, c4p, cforp, cloudforplanning, Cloud for Analytics, Cloud4Analytics, CloudforAnalytics, Cloud 4 Planning, BOC, SAPBusinessObjectsCloud, BusinessObjectsCloud, BOBJcloud, BOCloud., SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics,Error, Issue, System, Data, User, Unable, Access, Connection, Sac, Connector, Live, Acquisition, Up, Set, setup, Model, BW, Connect, Story, Tenant, Import, Failed, Using, Working, SAML, SSO, sapanalyticscloud, sap analytical cloud, sap analytical cloud, SAC, sap analyst cloud, connected, failure, stopped, sap analyst cloud, predictive analytics (analysis), data analysis (analytics) tools, analytics tools, sap analytics cloud, data literacy, advanced analytics, data democratization, analytics software, real time analytics, self service analytics, advanced data analytics, analytics as a service, analytics cloud / cloud analytics, saas analytics, cloud bi, enterprise planning, cloud data analytics, cloud based analytics, analytics cloud platform, modern analytics, real time analysis, cloud analytics solution(s), what is sap analytics cloud, cloud analytics tools, analytics in the cloud, cloud analytics software epm, business intelligence, sap analyst cloud,sac hot news sac kba , KBA , LOD-ANA-LS , Licensing and Full User Equivalent , How To

Product

SAP Analytics Cloud 1.0