I have followed a tutorial to setup a SharePoint Rest API : Link to the tutorial
With my generated client i am trying to get a list's items and posting new items to an existing list. It is working flawlessly from postman however i realised i have access to every SharePoint site in my tenant. After i registered a client on the appregnew.aspx page, i granted Right="FullControl" access on appinv.aspx in the permission XML box. I am pretty sure this is the problem and somehow i have to write a proper script here to grant only access to a specific site's list. The first thing i don't understand what why i am generating the client on appregnew for a specific site if in reality it is not only generated for that specific site. Secondly i have not found any tutorial for the permission xml for specific restrictions, only this:
Full Control - Has full control - User can make any call under end point "_api/web"
Edit - Can add, edit and delete lists; can view, add, update and delete list items and documents. - User Can do any operation on list and list items and end point would be "_api/web/Lists"
Read - Can view pages and list items and download documents. - User can do Get operations on list items and end point would be "_api/web/Lists/getByTitle('')/Item
I tried Edit/Write in the permission xml but i still have access to every site in my tenant.
Can you please help me with a sample XML restricting access to a specific site and that site's list.