Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CoE Starter Kit - QUESTION] Documentation around Azure Secret usage #4406

Closed
MichaelRoth42 opened this issue Dec 10, 2022 · 17 comments
Closed
Labels
coe-starter-kit CoE Starter Kit issues documentation Improvements or additions to documentation

Comments

@MichaelRoth42
Copy link

What is your question?

My user account is Power Platform Administrator, has the “Key Vault Secrets User” role for the key vault, as well as the “Reader” role inherited from the resource group the key vault is in.

As soon as I try to update the core components, I get the error message
“Solution "Center of Excellence - Core Components" failed to import: User is not authorized to read secrets from [...] ” (Error Code 8004801E)

This feels like a bug, but I guess I'm just missing something important. I ran out of ideas, can somebody help me out here?

What solution are you experiencing the issue with?

Core

What solution version are you using?

4.2

What app or flow are you having the issue with?

importing the solution

@MichaelRoth42 MichaelRoth42 added coe-starter-kit CoE Starter Kit issues question Further information is requested labels Dec 10, 2022
@Jenefer-Monroe
Copy link
Collaborator

Jenefer-Monroe commented Dec 12, 2022

We have seen a few people see something like this for initial setup. I believe the solution was that you need to leave this particular env var type (secret types) blank until after import.
Can you try to remove the secret, upgrade, and readd? Does that work?

@MichaelRoth42
Copy link
Author

I already imported the solution with the Global Admin account. That worked without any issues, but is there any documentations about requirements regarding the role in azure?

@Jenefer-Monroe
Copy link
Collaborator

I dont have any at the moment but I can use this bug to track as a documentation item.
Can you confirm before I do so, are you now unblocked?

@MichaelRoth42
Copy link
Author

Yes, it worked.

If you could track a doc item, that would be great. As always, I volunteer for any kind of test 😇

@Jenefer-Monroe
Copy link
Collaborator

Wonderful new. Thank you!

@Jenefer-Monroe Jenefer-Monroe changed the title [CoE Starter Kit - QUESTION] Import failed - user not authorized to read secrets [CoE Starter Kit - QUESTION] Documentation around Azure Secret usage Dec 12, 2022
@Jenefer-Monroe
Copy link
Collaborator

Documentation to include

  • Permissions needed in Azure
  • Setup steps in Azure
  • Setup steps to integrate with Power Platform Env Vars

@wiskaso
Copy link

wiskaso commented Apr 27, 2023

Has there been a change to the requirements of using Environment variables backed by Azure Key Vault secrets? As of late, when importing solutions that contain this type of component I'm getting the error above. I'm getting that via the ALM pipeline templates, through the UI I am able to still import the solutions successfullly.

@Jenefer-Monroe
Copy link
Collaborator

No there has not, if you are experiencing that it sounds like a bug in the ALM Accelerator, please post a bug for them.
Thank you!

@tkudya
Copy link

tkudya commented Jun 2, 2023

I am facing the same problem using Azure Keyvault when setting up Collect audit log data using an HTTP Call.
image

the account can access the keyvault, if i go to the keyvault directly.

@Jenefer-Monroe
Copy link
Collaborator

Hello. Unfortunately this documentation requirement has not yet made it into our priority list, we are a very small team. You will need to contact product support to get assistance on how to use secret type env vars at the moment if you are unable to do so from their existing documentation.

@robertfinkley
Copy link

Hi I'm having the same issue as the original posting. Even using the Global Administrator I am unable to get the Core Components upgraded. I created a SandBox environment and copied our CoE environment to it and did not run into this issue. Any help would be appreciated!

image

@Jenefer-Monroe
Copy link
Collaborator

Please contact product support, the key vault integration is just something we use, so if its not working it would be a product issue or product configuration. They will be able to assist you in using Azure Key Vaule and env vars.

@poidah
Copy link

poidah commented Jun 14, 2023

I have the same error with version 4.8 of the Core Components.

No matter what I do I ca not set the value for the environment variable called - "Azure Key Vault Secret". I have tried in the setup wizard and I have tied leaving it blanks and attempted to set it later as well...

This is after following all Microsoft documentation I could find... :(

The user I am installing with has:

  • The Power Platform Adminrole
  • Key Vault Reader permissions to the Azure Vault
  • Key Vault Secrets User permissions to the Azure Vault
  • Can view the key and the secret in the brwoser (Azure portal)

Microsoft.PowerPlatform is registered undr "Subscriptions" in the Azure Portal

I can't change any of the flows or apps in the solution as it is "managed".

How was this tested? As it looks like there is a dealbreaker right from the start...

@tkudya
Copy link

tkudya commented Jun 14, 2023

I believe i have found the solution

In the documentation: https://learn.microsoft.com/en-us/power-apps/maker/data-platform/EnvironmentVariables.

Your account will need/ or account that will be saving the secret: Key Vault Secrets User permissions
and
Dataverse Service Principal Application will require access as well with the Key Vault Secrets User permissions to the keyvault.
image

image

@Jenefer-Monroe
Copy link
Collaborator

thanks so much for sharing your investigation findings!

@Jenefer-Monroe Jenefer-Monroe added documentation Improvements or additions to documentation and removed question Further information is requested labels Jun 14, 2023
@manuelap-msft
Copy link
Contributor

we already link to https://learn.microsoft.com/en-us/power-apps/maker/data-platform/EnvironmentVariables from our documentation. I made a change to specifically call out "review the pre-requisites" from this article.

@CoEStarterKitBot
Copy link
Collaborator

@MichaelRoth42 This has been fixed in the latest release. Please install the latest version of the toolkit following the instructions for installing updates. Note that if you do not remove the unmanaged layers as described there you will not receive updates from us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coe-starter-kit CoE Starter Kit issues documentation Improvements or additions to documentation
Projects
Archived in project
Development

No branches or pull requests

9 participants