You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: certified-connectors/CognitiveServicesQuestionAnswering/Readme.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,12 +23,29 @@ You will need the following to proceed:
23
23
- A Microsoft Power Apps or Microsoft Power Automate plan with custom connector feature
24
24
- The Power platform CLI tools
25
25
26
+
## Building the connector for AAD Authentication
27
+
Since the APIs used by the connector are secured by Azure Active Directory (AD), we first need to set up a few things in Azure AD so that our connector can securely access the Microsoft Cognitive Services APIs. After this setup, you can create and test the connector.
28
+
29
+
### Set up an Azure AD application for your custom connector
30
+
Since the connector uses OAuth as authentication type, we first need to register an application in Azure AD. This application will be used to get the authorization token required to invoke rest APIs used by the connector on user's behalf. You can read more about this [here](https://docs.microsoft.com/en-us/azure/active-directory/develop/authentication-scenarios) and follow the steps below:
31
+
32
+
1. Create an Azure AD application
33
+
This can be done using [Azure Portal](https://portal.azure.com), by following the steps [here](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app). Once created, note down the value of Application (Client) ID. You will need this later.
34
+
35
+
2. Configure (Update) your Azure AD application to access Microsoft Cognitive Services APIs.
36
+
This step will ensure that your application can successfully retrieve an access token to Microsoft Cognitive Services rest APIs on behalf of your users. To do this, follow the steps [here](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-configure-app-access-web-apis).
37
+
- For redirect URI, use "https://global.consent.azure-apim.net/redirect"
38
+
- For the credentials, use a client secret (and not certificates). Remember to note the secret down, you will need this later and it is shown only once.
39
+
- For API permissions, make sure "Microsoft Cognitive Services" and "user_impersonation" are added.
40
+
41
+
At this point, we now have a valid Azure AD application that can be used to get permissions from end users and access Microsoft Cognitive Services. The next step for us is to create a custom connector.
42
+
26
43
## Deploying the connector
27
44
28
45
Run the following command and follow the prompts:
29
46
30
47
```paconn
31
-
paconn create --api-prop [Path to apiProperties.json] --api-def [Path to apiDefinition.swagger.json] --icon [Path to icon.png]
48
+
paconn create --api-prop [Path to apiProperties.json] --api-def [Path to apiDefinition.swagger.json] --icon [Path to icon.png] --secret <client_secret>
0 commit comments