cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect to Microsoft Graph API through an UI5 app on SAP Launchpad

Tri
Participant

I've developed an UI5 application and deployed it to SAP Cloud Platform and registered it on Launchpad portal.

I've tried to Authenticate with Microsoft Graph and it redirects me to the Microsoft authorization website. It returns the id_token appending to the redirect URL that I setup in App Registration on Azure.

The redirect url is like this: https://flpnwc-subaccount.dispatcher.ap1.hana.ondemand.com/sites#id_token=xxx

The error in console when it redirects:

sites:118 Uncaught TypeError: Cannot read property '6' of null
    at getIntentParameter (sites:118)
    at Object.requestSite (sites:364)
    at Object.getSiteJson (sites:512)
    at Object.loadAppSite (sites:579)
    at sites:765
    at sites:766

I've tried to change redirect urls in App Registration on Azure but it doesn't allow the url like this:https://flpnwc-subaccount.dispatcher.ap1.hana.ondemand.com/sites?siteId=site_id#app_name-create

I expect that after authentication, it redirects to the current UI5 application url and I can make a call to Microsoft Graph API such as https://graph.microsoft.com/v1.0/me/manager

Does anyone have any experience integrating Microsoft Graph API with UI5?

Accepted Solutions (1)

Accepted Solutions (1)

mariusobert
Developer Advocate
Developer Advocate
0 Kudos

Hi,

unfortunately, this doesn't seem to be possible atm as MS doesn't support hashes in the redirect URL. In non-fiori SAPUI5 app, you could handle the redirect in your main entry point of your web app, which isn't possible in Fiori apps (as the launchpad is that entry point).

You can upvote this feedback to Azure if you would like that Microsoft works on this 🙂

PS: If you only want to connect a "technical user", you can work around this issue with SAP Open Connectors

Answers (0)