cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to set up destination for SAP MDK app in SAP Mobile Services Cockpit

geetbijlani
Participant
1,059

Dear All,

We are trying to access sharepoint online from SAP MDK app via REST API. We do have the client credentials all the configurations are in place. This means we are able to access and create folder on SHarepoint online using POSTMAN. However, while doing the same thing using Fetch Javascript  gives CORS error which is understandable . So, trying the next possible way via destinations in SAP Mobile services returns a 401-Unauthorised error which could be because , I may not have set up the destinations correctly. Could anyone please help me , I have spent a lot of time and tried all possible combinations but without any luck.

Here are the details:

Call from Postman: 200

postman_sposuccess.png

The call from MDK: 401 using the destination

payloadchrom_mdk.pngchromemdk.png

The destination set up in Mobile services:

destination_mobileservices.pngIn BTP Cockpit

2024-06-03 10_28_44-Destinations - S1D_Dev _ MM Service GmbH - SAP BTP Cockpit.png

Kindly let me know if you feel there is other way to get this working.

Note: This deployed in cloud foundry and both as mobile and web application.

@bill_froelich  , @Jitendra_Kansal78 

Best Regards,

Geet

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert

Have you tried using OAuth2 Client Credentials as the security type in Mobile Services instead of OAuth2 SAML Bearer Assertion?

Answers (1)

Answers (1)

geetbijlani
Participant
0 Likes

Dear Bill,

Sorry for my delayed answer. Yes, I had already tried oauth2clientcrendentials as my first approach. However it turned out that it was the problem with the way url encoded data is transmitted and was causing the request to fail due to incorrect credentials.

 

Best Regards,

Geet