Skip to content

Commit 5505b01

Browse files
authored
Update Readme.md (#1719)
1 parent cbd154b commit 5505b01

File tree

1 file changed

+18
-1
lines changed
  • certified-connectors/CognitiveServicesQuestionAnswering

1 file changed

+18
-1
lines changed

certified-connectors/CognitiveServicesQuestionAnswering/Readme.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,29 @@ You will need the following to proceed:
2323
- A Microsoft Power Apps or Microsoft Power Automate plan with custom connector feature
2424
- The Power platform CLI tools
2525

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+
2643
## Deploying the connector
2744

2845
Run the following command and follow the prompts:
2946

3047
```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>
3249
```
3350

3451
## Supported actions

0 commit comments

Comments
 (0)