简体   繁体   中英

Azure AD Token generaiton using reactjs, to access WebAPI and SharePoint REST API/GrapAPI using jwt token

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM