question

justin-jia avatar image
0 Votes"
justin-jia asked justin-jia commented

microsoft identity web add custom JwtBearerOptions

spfx webpart call web api which secured with microsoft-identity-web
here is my code, it doesn't work

77781-16157837636817.png

it worked fine if i removed the microsoft-identity-web code.

this is the origin question
https://docs.microsoft.com/en-us/answers/questions/307163/consume-enterprise-apis-secured-with-azure-ad-in-s.html


azure-active-directoryazure-webapps-security
16157837636817.png (38.9 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


Does anyone have any update on this issue?

0 Votes 0 ·

What error do you get on it and which guide/sample are you following?

0 Votes 0 ·
justin-jia avatar image justin-jia MarileeTurscak-MSFT ·

@MarileeTurscak thanks for your response

i am following this wiki for identity web, and it work well
https://github.com/AzureAD/microsoft-identity-web/wiki/Mixing-web-app-and-web-api-in-the-same-ASP.NET-core-app

i am following this article for securing the web API which called by sharepoint webpart. it work well too.
https://www.reddit.com/user/azzurrabrancati/comments/f1r3op/consume_azure_ad_secured_web_api_net_core_31_from/

when i put them together just like the screenshot, the sharepoint webpart can't call the web api successfully, get a redirect response (to the https://login.microsoftonline.com)

0 Votes 0 ·

0 Answers