I am running into a very strange situation. The Consent dialog of Canvas app is showing Resources/connectors (sharepoint, outlook and etc) which are not used at all within the canvas app. I have checked the Database node, and there is no connector.
How can i remove these not used resources/connectors from Canvas app Consent dialog.
Could you please just confirm if the published app is the latest version? If not, it is possible that editing screen doesn't show connectors that are already deleted and playing app shows those.
Check if doing any or all of the following help:
A1) From the Canvas App at issue, open it for editing in Power Apps Studio and then, verify that going to the Data tab from the left side shows no data sources, or only shows those data sources you want. Even for the ones you want, you can try as a troubleshooting step to remove those during this step.
To remove a data source, use the ellipses near the data source, then from the flyout menu, there should be three options,"Edit Data" "Refresh" and "Remove". To take the data source out, click on "Remove"
Repeat the above for the remaining data sources showing in this "In your app" section of the "Data" tab.
A2) Save and Publish the app. (And then, here is an optional Step: Now unshare the App from everyone - make sure to write down who it was shared with - or as a test, pick one user who is having the issue, and unshare it only from the one user).
A3) Go to make.powerapps.com and then go to Data and then Connections. Delete all the connections you see there.
By the way, make sure you are in the same environment that hosts the app at issue - if not, click on the upper right where it says "Environment" and use the flyout that should slide in from the right side of the screen, to change the environment.
And from the flyout, click on one of the items from the right side to switch to that environment:
How to remove a Connection:
In a similar vein to how you removed a Data Source from a Canvas App, use the ellipses and from the flyout, click "Delete" to remove the Connection. The difference here is, this is for your environment, not just for the specific App at issue. What this part does is it will re-prompt for permissions again - however in this case, this will be related to attempting to automatically resolve the issue in conjunction with some other troubleshooting steps in here.
A4) Now, go ahead and clear all cache and cookies from the browser. Do this both on your own computer, and the computer for whom the rogue prompts are showing up. If using Chrome for example: Ellipses on upper right for the browser -> from flyout menu click "Settings" -> under Privacy and Security click on "Clear browsing data" -> In the modal, make sure Browsing History, Cookies and other site data, and Cached images and files all have a checkmark, if not, click the empty box to the left of the item to make it checked - > Under "Time range" dropdown make sure it says "All time" -> click Clear data -> Close all tabs and windows of the browser, wait about 30 seconds after doing this (and/or make sure all the browser processes are truly terminated with a task manager), and then open the browser again.
If the Power App is being used from a mobile device (i.e. using the Power Apps Native Mobile App), if using Android or iOS you should clear the stored Native App Data for the Power Apps Native Mobile App - on Android 11 for example this is located at: Swipe upwards from center of home screen (on two-gesture OS) -> from here tap Settings -> then tap Apps and Notifications -> then select the Power Apps Native Mobile App from this menu -> while not usually recommended under ordinary circumstances, from here you may want to tap "force Stop" to force close the app -> and then also, make sure to go to "Storage & cache" on this screen -> click "Clear storage" to clear the app storage. Also, after doing this, uninstall and reinstall the Power Apps Native app just in case to make sure it is on latest version and also as a troubleshooting step. On Windows Phone specifically, the only option is to uninstall and reinstall the native Power Apps Mobile App to also clear the underlying application data at the same time.
A5) Did you attempt the optional step, which was step A2 above when you unshared the app? (Note that saving and publishing the app was not optional, just the unsharing part was optional). Now you should log in again and then share the app with the user(s) that you unshared the app with. If you did not do that optional part, you can simply go to the next step now.
A6) Now have the user retry logging in to the browser or device on which Step A4 above was performed, and and see if there are any more prompts for rogue permissions. Even if the Canvas App is still using Connections, now it should be only those which are in the App and not any others. If none are being used, none should be prompted for in most cases.
A7) If the issue is still not resolved, please start from Step A1, and repeat all the steps one more time - and see if going through all those steps one more time through resolves it. Especially check if Step A1 still shows the Data Sources you deleted before, and if Step A3 still shows the deleted Connections, and try removing them again.
A8) If Step A1 or A3 gives an error and does not allow the deletion, have an Office 365 Global Admin or at least someone with enough privilege to access all the resources of an Environment (such as Environment Admin) try these steps instead. Also if the issue is not resolved, even with you or an Environment Admin trying it, please also have an Office 365 Global Admin try these steps once or twice through, just in case.
Check if the above helps @jeffgreenrc