diff --git a/samples/azure-http-key-vault/README.md b/samples/azure-http-key-vault/README.md index ac1d47d..5c424d3 100644 --- a/samples/azure-http-key-vault/README.md +++ b/samples/azure-http-key-vault/README.md @@ -1,78 +1,4 @@ # Azure HTTP Key Vault -## Summary - -A HTTP Request via Graph API to Azure Key Vault - -![picture of the flow](assets/flow.png) - -## Applies to - -* [Microsoft Power Automate](https://docs.microsoft.com/en-us/power-automate/getting-started) -* [Azure Logic Apps](https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-overview) - -## Compatibility - -![Premium License](https://img.shields.io/badge/Premium%20License-Required-yellow.svg "Premium license required") -![On-Premises Connectors](https://img.shields.io/badge/On--Premises%20Connectors-No-green.svg "Does not use on-premise connectors") -![Custom Connectors](https://img.shields.io/badge/Custom%20Connectors-Not%20Required-green.svg "Does not use custom connectors") - -## Authors - -Solution|Author(s) ---------|--------- -azure-http-key-vault | [Divya Akula](https://github.com/divya-akula) - -## Version history - -Version|Date|Comments --------|----|-------- -1.0|Sep 18, 2022|Initial release - -## Features - -Azure Key vault helps us to securely store passwords ,Power Automate has an inbuilt connector that helps us to retrieve the passwords safely, but when moving the flows across tenants , we might need to reconfigure the flow for appropriate credentials. To prevent this we can go with the graphapi invocation to azure using the HTTP connector. - -This pattern also helps to understand the OAuth way of invoking a Azure or any other resource that supports OAuth. - -Prerequisites: -As the app uses HTTP way to connect to Azure platform , the connector would need appropriate permissions to invoke an Azure Resource.To do this -1. User has to navigate to [Azure Portal](https://portal.azure.com) -2. Create new App registration as shown in the below screenshot - -![picture of the flow](assets/AppRegistration.png) - -3. Once the application is registered,navigate to the **API Permissions** > **Add Permission** > **Select Microsoft Graph** > **APIConnectors.Read.All** - -![picture of the flow](assets/AzurePermissionRequest.png) - -4. Once the permissions are requested , the administrator has to give the consent before using the HTTP connector - -![picture of the flow](assets/AzurePermissionConfiguration.png) - -## Minimal Path to Awesome - -* [Download](solution/HttpCallForKeyVault.zip) the `.zip` from the `solution` folder -* [Import](https://flow.microsoft.com/en-us/blog/import-export-bap-packages/) the `.zip` file using **My Flows** > **Import** > **Upload** within Microsoft Flow. - -## Disclaimer - -**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** - -## Help - -We do not support samples, but we this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues. - -If you encounter any issues while using this sample, [create a new issue](https://github.com/pnp/powerautomate-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=bug-report.yml&sample=always-reply-to-request&authors=@remyblok&title=always-reply-to-request%20-%20). - -For questions regarding this sample, [create a new question](https://github.com/pnp/powerautomate-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=question.yml&sample=always-reply-to-request&authors=@remyblok&title=always-reply-to-request%20-%20). - -Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/powerautomate-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=suggestion.yml&sample=always-reply-to-request&authors=@remyblok&title=always-reply-to-request%20-%20). - -## For more information - -- [Create your first flow](https://docs.microsoft.com/en-us/power-automate/getting-started#create-your-first-flow) -- [Microsoft Power Automate documentation](https://docs.microsoft.com/en-us/power-automate/) - - - +> [!Important] +> This sample has now been migrated to the a [different repository](https://github.com/pnp/powerplatform-samples/tree/main/samples/azure-http-key-vault). \ No newline at end of file diff --git a/samples/azure-http-key-vault/assets/AppRegistration.png b/samples/azure-http-key-vault/assets/AppRegistration.png deleted file mode 100644 index c424a0d..0000000 Binary files a/samples/azure-http-key-vault/assets/AppRegistration.png and /dev/null differ diff --git a/samples/azure-http-key-vault/assets/AzurePermissionConfiguration.png b/samples/azure-http-key-vault/assets/AzurePermissionConfiguration.png deleted file mode 100644 index 3e3e6a2..0000000 Binary files a/samples/azure-http-key-vault/assets/AzurePermissionConfiguration.png and /dev/null differ diff --git a/samples/azure-http-key-vault/assets/AzurePermissionRequest.png b/samples/azure-http-key-vault/assets/AzurePermissionRequest.png deleted file mode 100644 index b17310c..0000000 Binary files a/samples/azure-http-key-vault/assets/AzurePermissionRequest.png and /dev/null differ diff --git a/samples/azure-http-key-vault/assets/HttpConnectorAutorizationToken.png b/samples/azure-http-key-vault/assets/HttpConnectorAutorizationToken.png deleted file mode 100644 index c12eaf8..0000000 Binary files a/samples/azure-http-key-vault/assets/HttpConnectorAutorizationToken.png and /dev/null differ diff --git a/samples/azure-http-key-vault/assets/InvokingKeyVault.png b/samples/azure-http-key-vault/assets/InvokingKeyVault.png deleted file mode 100644 index e10a751..0000000 Binary files a/samples/azure-http-key-vault/assets/InvokingKeyVault.png and /dev/null differ diff --git a/samples/azure-http-key-vault/assets/flow.png b/samples/azure-http-key-vault/assets/flow.png deleted file mode 100644 index fa2bac7..0000000 Binary files a/samples/azure-http-key-vault/assets/flow.png and /dev/null differ diff --git a/samples/azure-http-key-vault/assets/sample.json b/samples/azure-http-key-vault/assets/sample.json deleted file mode 100644 index 8801296..0000000 --- a/samples/azure-http-key-vault/assets/sample.json +++ /dev/null @@ -1,73 +0,0 @@ -[ - { - "$schema": "https://developer.microsoft.com/en-us/json-schemas/pnp/samples/v1.0/metadata-schema.json", - "name": "pnp-powerautomate-samples-azure-http-key-vault", - "version": "1.0.0.0", - "source": "pnp", - "creationDateTime": "2022-09-16", - "updateDateTime": "2021-09-16", - "title": "Leveraging Graph API to get password from Azure Key Vault", - "shortDescription": "A sample for geeting the keyvault details using graph api", - "longDescription": [ - "The sample provides details on can you leverage the graph api to connect to azure platform along with the authentication details" - ], - "url": "https://github.com/pnp/powerautomate-samples/tree/main/samples/azure-http-key-vault", - "products": [ - "Power Automate", - "Azure" - ], - "tags": [ - "PATTERNS", - "EXCEPTION-HANDLING" - ], - "categories": [ - "POWERAUTOMATE" - ], - "metadata": [ - { - "key": "POWERAUTOMATE-PREMIUM", - "value": "yes" - }, - { - "key": "POWERAUTOMATE-ONPREM", - "value": "No" - }, - { - "key": "POWERAUTOMATE-CUSTOMCONNECTOR", - "value": "No" - } - ], - "thumbnails": [ - { - "type": "image", - "order": 100, - "url": "https://github.com/pnp/powerautomate-samples/blob/main/samples/azure-http-key-vault/assets/flow.png?raw=true", - "alt": "Preview of the solution" - } - ], - "authors": [ - { - "gitHubAccount": "divya-akula", - "name": "Divya Akula", - "pictureUrl": "https://avatars.githubusercontent.com/u/9211327?v=4" - } - ], - "references": [ - { - "name": "Create your first flow", - "description": "Anyone from a basic business user to an IT professional can create automated processes using Power Automate's no-code/low-code platform.", - "url": "https://docs.microsoft.com/en-us/power-automate/getting-started#create-your-first-flow" - }, - { - "name": "Microsoft Power Automate documentation", - "description": "Power Automate is a service that helps you create automated workflows between your favorite apps and services to synchronize files, get notifications, collect data, and more.", - "url": "https://docs.microsoft.com/en-us/power-automate/" - }, - { - "name": "Application Registration in Azure", - "description": "Application registration would be needed whenever we are trying to access any of the graph APIs", - "url": "https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-configure-app-access-web-apis" - } - ] - } -] \ No newline at end of file diff --git a/samples/azure-http-key-vault/solution/HttpCallForKeyVault.zip b/samples/azure-http-key-vault/solution/HttpCallForKeyVault.zip deleted file mode 100644 index 7115f59..0000000 Binary files a/samples/azure-http-key-vault/solution/HttpCallForKeyVault.zip and /dev/null differ diff --git a/samples/azure-http-key-vault/sourcecode/Microsoft.Flow/flows/d14a162f-c094-485e-a47e-6270058d8fbd/apisMap.json b/samples/azure-http-key-vault/sourcecode/Microsoft.Flow/flows/d14a162f-c094-485e-a47e-6270058d8fbd/apisMap.json deleted file mode 100644 index 9e26dfe..0000000 --- a/samples/azure-http-key-vault/sourcecode/Microsoft.Flow/flows/d14a162f-c094-485e-a47e-6270058d8fbd/apisMap.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/samples/azure-http-key-vault/sourcecode/Microsoft.Flow/flows/d14a162f-c094-485e-a47e-6270058d8fbd/connectionsMap.json b/samples/azure-http-key-vault/sourcecode/Microsoft.Flow/flows/d14a162f-c094-485e-a47e-6270058d8fbd/connectionsMap.json deleted file mode 100644 index 9e26dfe..0000000 --- a/samples/azure-http-key-vault/sourcecode/Microsoft.Flow/flows/d14a162f-c094-485e-a47e-6270058d8fbd/connectionsMap.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/samples/azure-http-key-vault/sourcecode/Microsoft.Flow/flows/d14a162f-c094-485e-a47e-6270058d8fbd/definition.json b/samples/azure-http-key-vault/sourcecode/Microsoft.Flow/flows/d14a162f-c094-485e-a47e-6270058d8fbd/definition.json deleted file mode 100644 index 351b152..0000000 --- a/samples/azure-http-key-vault/sourcecode/Microsoft.Flow/flows/d14a162f-c094-485e-a47e-6270058d8fbd/definition.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"6a99d7ae-0012-42cb-b89e-103a2ac99277","id":"/providers/Microsoft.Flow/flows/6a99d7ae-0012-42cb-b89e-103a2ac99277","type":"Microsoft.Flow/flows","properties":{"apiId":"/providers/Microsoft.PowerApps/apis/shared_logicflows","displayName":"KeyVaults","definition":{"metadata":{"workflowEntityId":null,"processAdvisorMetadata":null,"flowclientsuspensionreason":"None","flowclientsuspensiontime":null,"flowclientsuspensionreasondetails":null,"creator":{"id":"e15cde1d-edef-4114-bdf4-bd62689f2061","type":"User","tenantId":"c09030dd-81e0-44af-a342-68c9358c43dd"},"provisioningMethod":"FromDefinition","failureAlertSubscription":true,"clientLastModifiedTime":"2022-07-11T23:45:45.2482252Z"},"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$authentication":{"defaultValue":{},"type":"SecureObject"}},"triggers":{"manual":{"metadata":{"operationMetadataId":"08397e2f-9fff-455d-863a-d9ce43908b8d"},"type":"Request","kind":"Button","inputs":{"schema":{"type":"object","properties":{},"required":[]}}}},"actions":{"AuthorizationToken":{"runAfter":{},"metadata":{"operationMetadataId":"cd28a01b-8008-4075-8d68-71461fa23ab0"},"type":"Http","inputs":{"method":"POST","uri":"https://login.microsoftonline.com/c09030dd-81e0-44af-a342-68c9358c43dd/oauth2/v2.0/token","headers":{"Content-Type":"application/x-www-form-urlencoded"},"body":"client_id=f894d8cf-fa5b-478b-9ecf-27323e289f76&scope=https://vault.azure.net/.default&client_secret=jl38Q~H1k210I.dMfZnIZI2n8WYApxv6inBEmcYJ&grant_type=client_credentials"}},"InvokeKeyVault":{"runAfter":{"AuthorizationToken":["Succeeded"]},"metadata":{"operationMetadataId":"fbbadc42-0136-46d3-a39f-67f2c91fc405"},"type":"Http","inputs":{"method":"GET","uri":"https://cognitiveapivault.vault.azure.net/secrets/UnoKey/087b33200a8d482aafbb58f20fb863c9?api-Version=7.3","headers":{"Authorization":"@{concat('Bearer ',body('AuthorizationToken')?['access_token'])}"}}}}},"connectionReferences":{},"flowFailureAlertSubscribed":false,"isManaged":false}} \ No newline at end of file diff --git a/samples/azure-http-key-vault/sourcecode/Microsoft.Flow/flows/manifest.json b/samples/azure-http-key-vault/sourcecode/Microsoft.Flow/flows/manifest.json deleted file mode 100644 index 0dad60c..0000000 --- a/samples/azure-http-key-vault/sourcecode/Microsoft.Flow/flows/manifest.json +++ /dev/null @@ -1 +0,0 @@ -{"packageSchemaVersion":"1.0","flowAssets":{"assetPaths":["d14a162f-c094-485e-a47e-6270058d8fbd"]}} \ No newline at end of file diff --git a/samples/azure-http-key-vault/sourcecode/manifest.json b/samples/azure-http-key-vault/sourcecode/manifest.json deleted file mode 100644 index 14b8d20..0000000 --- a/samples/azure-http-key-vault/sourcecode/manifest.json +++ /dev/null @@ -1 +0,0 @@ -{"schema":"1.0","details":{"displayName":"HttpCallForKeyVault","description":"","createdTime":"2022-07-31T14:21:03.5407448Z","packageTelemetryId":"a454b2c3-339c-4a6f-b113-13ca03a5810a","creator":"N/A","sourceEnvironment":""},"resources":{"d14a162f-c094-485e-a47e-6270058d8fbd":{"type":"Microsoft.Flow/flows","suggestedCreationType":"New","creationType":"Existing, New, Update","details":{"displayName":"KeyVaults"},"configurableBy":"User","hierarchy":"Root","dependsOn":[]}}} \ No newline at end of file