0
votes

We have react site, that is generating jwt token and talking to API using adal. Now we need to upload files to the SharePoint library.

If this possible using adal? how? any sample please?

Currently we have created demo app using msal it generates access token and Id token, Id token works for API and access token works for MSGraph API, BUT login happens using popup. When I changes popup to Redirect, so after login it keep redirecting site. refer known Issue

I am stuck redirect is creating issue and if I try SuncWeek-react-aad-msal everything is good, BUT Token working for API but NOT GraphAPI, I tried putting scope https://graph.microsoft.com/Sites.Manage.All and added access in Azure app registration also, but NO LUCK

any help is much appreciated TA.

1
The link you shared for loginPopup issue and can explain what do you mean by "keep redirecting site" after you change from loginPopup to redirect?Dhivya G - MSFT Identity
Okay, so When I did login with popup it worked, and generates the token. but When I change Popup to Redirect, so site redirect user to login using microsoft page. user logs in, and url comes back to my react site, and I can see the Token in Url, but page automatically keep redirecting for few times and in last says login failed, the error link that I have share it has same issue that is I am facing in login redirectPraveen
Could you please give us the Fiddler trace for us for the login failed call. it would be helpful.Dhivya G - MSFT Identity

1 Answers

0
votes

For requesting access token with specific for Microsoft graph using MSAL library, you can just give scopes like Site.Manage.all, You may refer samples here for various platform.