Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Error Handling
Unanswered

Access denied. The site value included in this solution cannot be accessed with the selected connection.

(0) ShareShare
ReportReport
Posted on by 40

The following error appears while importing a solution from our Dev (Unmanaged) to our Test( Managed) environment.

 

"Access denied. The site value included in this solution cannot be accessed with the selected connection. "

 

This message appears under the text box for the SharePoint environment variable where the SharePoint site to be used in the new environment is entered.  Normally the text box is able to be typed in but now it is grayed out and no entries can be made.

 

This had been working previously up to version 15 (1.0.0.15) but version 16 and beyond the above error message appears. 

 

The Connection References existed in version 15 and still exist in version 16 and beyond, currently on v22.  The Connection References use my personal ID and a functional account setup for running the app and the associated workflows.  Have verified since getting the error that permissions for both IDs are still valid for the SharePoint site where the error appears.  Again, these connection references worked in version 15 with no errors.   

 

The difference between version 15 of the solution and version 16 of the solution is that the workflow I was working on was completed.  In version 15 of the solution the workflow was only partially complete, it had a trigger that would activate when a record is updated or added to a particular SharePoint list. It also had a control element that would evaluate an environment variable value to see if it says "Prod" or not and if it evaluation result is "YES" it would follow that path to set some variables that would be used later in the flow for email addresses. At the end of the flow it was set to email me the values of the variables to verify the values were indeed set correctly.  The solution was then tested by exporting it and importing it to our "Test" environment.  The import process went as expected, the SharePoint site did not give an error and was able to be updated as were all the SharePoint lists associated with the solution.  After a successful test of the app and the workflows the workflow in the Dev environment was then completed with all of the additional steps needed for our process. Workflow was tested in the Dev environment and after correcting some issues the workflow ran without error in the Dev environment. 

 

The next import of the workflow the error mentioned above appears. The only thing in the solution that changed between solution exports was the workflow that was finished.  The same Connection References in the partially completed workflow are still being used in the completed workflow.

 

Any guidance is appreciated. 

 

  • pAAMckelvey Profile Picture
    40 on at
    Re: Access denied. The site value included in this solution cannot be accessed with the selected connection.
    Make sure to check that your Connection in the environment you are importing into is properly referenced in the Deployment Settings file.  If the connection has changed the guid for it has also changed, see ConnectionId in the example below.  Make sure your service principle used in the Import step of your pipeline has been giving permissions to the connection before the pipeline is executed. 
     
    "ConnectionReferences": [
        {
          "LogicalName": "publisher_sharedoffice365_xxxxx",
          "ConnectionId": "xxx64f3eab8c486fa8eadzzzxxxxxxx",
          "ConnectorId": "/providers/Microsoft.PowerApps/apis/shared_office365"
        }
    ]
     
    I know a lot has changed since this original post but for us it was key to use a pipeline to move our Solutions from one environment to another reliably. While it is a little challenging to get setup the first time it is 100% worth it later on when implementing changes especially if you have to iterate between your Development and Test environment working out code issues with the app.   The pipeline keeps the deployment to minutes instead of 30 min to an hour in some cases. 
  • Enrico Profile Picture
    25 on at
    Re: Access denied. The site value included in this solution cannot be accessed with the selected connection.

    We face the same error. Deployment worked for weeks and now the problem is occurring for unknown reason.

    We had the problem yesterday while exporting/importing a managed solution from dev to stage. 

    For some reason today it is working again as expected. However the same error now pops up when importing the solution in the production environment.

     

    Any ideas?

  • pAAMckelvey Profile Picture
    40 on at
    Re: Access denied. The site value included in this solution cannot be accessed with the selected connection.

    Zematsirhc,

    It has been a while since this was posted.  At the time the movement between environments was done manually, now we use a pipeline.  While not a perfect way of doing it what I came up with was to manually create the connections in the new environment and add the user of the pipeline as an owner of the connection so when the pipeline executes it has enough permissions for the connection to work and the pipeline completes without error and activates.  In my case the pipeline user is a service principal which has been given specific permissions needed to perform the export/import process.

     

  • zematsirhc Profile Picture
    90 on at
    Re: Access denied. The site value included in this solution cannot be accessed with the selected connection.

    I'm having the same issue. Did you ever find the answer?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Error Handling

#1
stampcoin Profile Picture

stampcoin 52

#2
DS-11051211-0 Profile Picture

DS-11051211-0 20

#3
HumanOnly Profile Picture

HumanOnly 6

Overall leaderboard

Featured topics