Building an add-in tile and getting error about CORS Policy
The error I'm getting is when my tile loads on the screen and it's attempting to get data from the Constituents API:
Access to XMLHttpRequest at 'https://oauth2.sky.blackbaud.com/authorization?client_id=7400c620-5f48-4e98-8c46-468589124ec6&response_type=code&state=carissa&redirect_uri=https://localhost:5001/auth/callback' (redirected from 'https://localhost:5001/api/constituents/280') from origin 'https://localhost:5001' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I am using a asp.net CORE app to do the API calls and have already tried the App.UseCors() functionality in my Startup.Configuration function.
Has anyone else run into this? I'd like to get this working on my local machine before putting the code in the cloud (I think that maybe this is only an issue with localhost) but maybe it'll happen in the cloud as well. Any help is appreciated.
Thanks
Access to XMLHttpRequest at 'https://oauth2.sky.blackbaud.com/authorization?client_id=7400c620-5f48-4e98-8c46-468589124ec6&response_type=code&state=carissa&redirect_uri=https://localhost:5001/auth/callback' (redirected from 'https://localhost:5001/api/constituents/280') from origin 'https://localhost:5001' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I am using a asp.net CORE app to do the API calls and have already tried the App.UseCors() functionality in my Startup.Configuration function.
Has anyone else run into this? I'd like to get this working on my local machine before putting the code in the cloud (I think that maybe this is only an issue with localhost) but maybe it'll happen in the cloud as well. Any help is appreciated.
Thanks
0
Comments
-
Hi @Carissa Malone. Are you also applying a CORS policy and specifying the localhost origin?
Here's some info in the MS docs for .Net Core:
0
Categories
- All Categories
- 6 Blackbaud Community Help
- 213 bbcon®
- 1.4K Blackbaud Altru®
- 403 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 656 Blackbaud Grantmaking™
- 577 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 939 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.6K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 249 ResearchPoint™
- 119 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 241 Member Lounge (Just for Fun)
- 34 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Grid View Batch
- 3 (Closed) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 794 Community News
- 3K Jobs Board
- 54 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
