Dec 10 2020 09:15 AM
Dec 10 2020 09:15 AM
I am building an isolated SPFx Client Side Web Part that uses an aadHttpRequest to write events to a user's calendar. For this I need Calendars.ReadWrite delegated permissions.
My issue: when I test in the online workbench, I get a 403 error. I suppose this is because the Web Part hasn't been deployed yet, and the application registration with those permissions doesn't exist yet.
How can I address this chicken & egg issue, and test my Web Part before deploying it?
Dec 16 2020 03:44 PMSolution
@Christophe HumbertWell, you have to have global admin, so if you don't, you might be stuck.
If you do, though, then you could try to upload this incomplete version of the program, which will create the request for permission. Then grant the permissions, and delete your package from sharepoint. The permission request appears very simplistic in the admin console. It is my impression that as long as you keep the same ids and package names through the course of development, then your later and final versions will also get your permissions granted. I think it's not really tied to your actual SPFX package, except by the ids in the manifest. I could be wrong about that; my own attempts to do the same were cut short for unrelated reasons.
If your problem is not having global admin, you could try to get yourself a development tenant where you have admin privileges, that may be all you need to do your development. Then you won't have to ask an admin until you have something that's complete. IMHO you shouldn't have to have a complete project before the permission is granted, though.
The global admin part starts at step 4 in this document, although it's written as if one person would be doing all of this:
Note also that there can be a strange pause before the menu options appeared in the admin console. If you read quickly, you might see a menu option in the document that isn't where it's supposed to be in your admin console. Just give it a minute, though.
Dec 17 2020 10:36 AM
May 12 2022 09:16 AM