microsoft / coe-starter-kit

Other
748 stars 220 forks source link

[CoE Starter Kit - QUESTION] New Environment Variable Errors #9128

Open kholley01 opened 5 days ago

kholley01 commented 5 days ago

Does this question already exist in our backlog?

What is your question?

I am trying to create a new environment variable and I am getting the following two errors:

"This variable didn't save properly. User is not authorized to read secrets from '/subscriptions/13eba60d-16d5-4b55-9f9d-eee2547deae5/resourceGroups/AzureFiles-RG/providers/Microsoft.KeyVault/vaults/PowerPlatformKeyVault3/secrets/PowerPlatformSecret3' resource."

"This variable didn't save properly. Cannot complete the creation of EnvironmentVariableDefinition because it violates a database constraint. The violation happens on the key schemaname: cre7e_PowerPlatformKeySecret. Please delete the existing record or use update."

I have added myself as a Key Vault Secrets User in the Subscription, Resource Group, Key Vault, and the Secret itself and I am getting either one of these errors. When I change the "schemaname", I then get the "not authorized to read secrets" error. Not sure where to go for both errors. Any help would be appreciated.

Thank you!! Image Image

What solution are you experiencing the issue with?

Core

What solution version are you using?

4.43

What app or flow are you having the issue with?

New Environment Vairable

What method are you using to get inventory and telemetry?

Cloud flows

pete-msft commented 4 days ago

@kholley01 So are you trying to set the value for CoE Kit environment variables Audit Logs - Client Azure Secret and/or Command Center - Client Azure Secret?

Image

If yes then you do not need to create new environment variable for CoE but configure the value for these existing environment variables available in CoE solution. As you are configuring secret you need to do this in Default solution of the environment

Image

kholley01 commented 4 days ago

Thank you for the response. I have tried to change the variable in the Default solution and I’m still receiving the error.

@.***

Thank you!

Kennith “Kenny” Holley IT Systems Administrator Primoris Services Corporation www.prim.comhttp://www.prim.com @.*** “Primoris, building America’s future, today.”

From: Pete Puustinen @.> Sent: Wednesday, October 16, 2024 3:04 AM To: microsoft/coe-starter-kit @.> Cc: Kennith Holley @.>; Mention @.> Subject: Re: [microsoft/coe-starter-kit] [CoE Starter Kit - QUESTION] New Environment Variable Errors (Issue #9128)

CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you have verified the sender and know the content is safe! If this message is suspicious, please use the Report Phish button to notify IT.

@kholley01https://urldefense.com/v3/__https:/github.com/kholley01__;!!KKniHw!i3J_RD59U32MGpU3jh4ERK7z0SB-rWKwhLyHA8FD7aQGeA4r7zjID9Sq83Bs0Rn4sgzLZhDlOV-6YpbXzSoYdA$ So are you trying to set the value for CoE Kit environment variables Audit Logs - Client Azure Secret and/or Command Center - Client Azure Secret?

image.png (view on web)https://urldefense.com/v3/__https:/github.com/user-attachments/assets/557398b6-6ead-4155-b0b1-4a9e5353ee95__;!!KKniHw!i3J_RD59U32MGpU3jh4ERK7z0SB-rWKwhLyHA8FD7aQGeA4r7zjID9Sq83Bs0Rn4sgzLZhDlOV-6YpYNfSP-1A$

If yes then you do not need to create new environment variable for CoE but configure the value for these existing environment variables available in CoE solution. As you are configuring secret you need to do this in Default solution of the environment

image.png (view on web)https://urldefense.com/v3/__https:/github.com/user-attachments/assets/a11bbfab-96c5-46f5-b264-92f3bbd9cef7__;!!KKniHw!i3J_RD59U32MGpU3jh4ERK7z0SB-rWKwhLyHA8FD7aQGeA4r7zjID9Sq83Bs0Rn4sgzLZhDlOV-6YpYgypkvIQ$

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/microsoft/coe-starter-kit/issues/9128*issuecomment-2415903989__;Iw!!KKniHw!i3J_RD59U32MGpU3jh4ERK7z0SB-rWKwhLyHA8FD7aQGeA4r7zjID9Sq83Bs0Rn4sgzLZhDlOV-6YpZrjgm9Rw$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/BL6DH4COWM33P7INJZWDL2DZ3YFUFAVCNFSM6AAAAABP73YVTWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJVHEYDGOJYHE__;!!KKniHw!i3J_RD59U32MGpU3jh4ERK7z0SB-rWKwhLyHA8FD7aQGeA4r7zjID9Sq83Bs0Rn4sgzLZhDlOV-6YpbvxDZoNw$. You are receiving this because you were mentioned.Message ID: @.**@.>>

Note!: This email originated from outside our organization. Be cautious when opening Links and Attachments that you were not expecting.

Jenefer-Monroe commented 4 days ago

Validate that the azure key vault permissions are correct. User needs to be in Key Vault Secret User role explicitly to read, and in the Key Vault Contributor Role to update. And your access needs to be via RBAC For more information Use environment variables for Azure Key Vault secrets

  1. RBAC Image
  2. Specific Roles image
kholley01 commented 4 days ago

Verified that roles and RBAC is correct and still receiving the read secrets error message.

Jenefer-Monroe commented 4 days ago

Did you validate this step from the document: Use environment variables for Azure Key Vault secrets Image

kholley01 commented 4 days ago

Confirmed that step was completedImage .

Jenefer-Monroe commented 4 days ago

ok unfortunately you will need to reach out to product support. This is product UX we are looking at and those are the troubleshooting steps I know. Sorry I cant be of more assistance.

pete-msft commented 2 days ago

@kholley01 So you have verified that the account you are using to set the value of the environment variable has Key Vault Secrets User permissions in the KeyVault?

Image

Image

Image

kholley01 commented 2 days ago

Yessir. I have confirmed that the account has Key Vault Secrets User permissions in the Key Vault.

Again, I really do appreciate the help.

Thank you!

Kennith “Kenny” Holley IT Systems Administrator Primoris Services Corporation www.prim.comhttp://www.prim.com @.*** “Primoris, building America’s future, today.”

From: Pete Puustinen @.> Sent: Friday, October 18, 2024 4:05 AM To: microsoft/coe-starter-kit @.> Cc: Kennith Holley @.>; Mention @.> Subject: Re: [microsoft/coe-starter-kit] [CoE Starter Kit - QUESTION] New Environment Variable Errors (Issue #9128)

CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you have verified the sender and know the content is safe! If this message is suspicious, please use the Report Phish button to notify IT.

@kholley01https://urldefense.com/v3/__https:/github.com/kholley01__;!!KKniHw!hlQtr3B4oEP0pSG0IwfFUuAPZsuEBT_6tBf6JxOCAMFT0-SueMwmTFIzpE_9d_oNb4zmIRRL60Qbrkzpwqq9vg$ So you have verified that the account you are using to set the value of the environment variable has Key Vault Secrets User permissions in the KeyVault?

image.png (view on web)https://urldefense.com/v3/__https:/github.com/user-attachments/assets/bc3b3691-7df1-49c1-9d91-a77ebee3d05a__;!!KKniHw!hlQtr3B4oEP0pSG0IwfFUuAPZsuEBT_6tBf6JxOCAMFT0-SueMwmTFIzpE_9d_oNb4zmIRRL60QbrkxR7Zqy9g$

image.png (view on web)https://urldefense.com/v3/__https:/github.com/user-attachments/assets/0ff716b2-7976-4c54-932f-38b6966f8bb0__;!!KKniHw!hlQtr3B4oEP0pSG0IwfFUuAPZsuEBT_6tBf6JxOCAMFT0-SueMwmTFIzpE_9d_oNb4zmIRRL60Qbrky1I_ML5Q$

image.png (view on web)https://urldefense.com/v3/__https:/github.com/user-attachments/assets/f42df6ac-af67-4a4b-be32-e728be1d7133__;!!KKniHw!hlQtr3B4oEP0pSG0IwfFUuAPZsuEBT_6tBf6JxOCAMFT0-SueMwmTFIzpE_9d_oNb4zmIRRL60Qbrkw4fs_Rxw$

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/microsoft/coe-starter-kit/issues/9128*issuecomment-2421767049__;Iw!!KKniHw!hlQtr3B4oEP0pSG0IwfFUuAPZsuEBT_6tBf6JxOCAMFT0-SueMwmTFIzpE_9d_oNb4zmIRRL60Qbrkwi-dZ-Cg$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/BL6DH4AKZYZKTYBZHKNDNDDZ4C6KBAVCNFSM6AAAAABP73YVTWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRRG43DOMBUHE__;!!KKniHw!hlQtr3B4oEP0pSG0IwfFUuAPZsuEBT_6tBf6JxOCAMFT0-SueMwmTFIzpE_9d_oNb4zmIRRL60QbrkxKMM02pg$. You are receiving this because you were mentioned.Message ID: @.**@.>>

Note!: This email originated from outside our organization. Be cautious when opening Links and Attachments that you were not expecting.