7d2ff7061e | ||
---|---|---|
.. | ||
Readme.md | ||
apiDefinition.swagger.json | ||
apiProperties.json |
Readme.md
Planner Connector
Planner API in Microsoft Graph lets you create tasks and assign them to users in a group in Office 365. It enables you to easily bring together teams, tasks, documents, and conversations for better results. This connector exposes a subset of this API as operations in Microsoft Power Automate and Power Apps.
Pre-requisites
You will need the following to proceed:
- A Microsoft Power Apps or Microsoft Power Automate plan with custom connector feature
- An Azure subscription
- The Power platform CLI tools
Building the connector
Since the API used by the connector is secured by Azure Active Directory (AD), we first need to set up a few things in Azure AD for connector to securely access them. After this setup, you can create and test the connector.
Set up an Azure AD application for your custom connector
Since the connector uses OAuth as the 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 the rest API used by the connector on the user's behalf. You can read more about this here and follow the steps below:
-
Create an Azure AD application This can be done on the [Azure Portal] (https://portal.azure.com), by following the steps here. Once created, note down the value of Application (Client) ID. You will need this later.
-
Configure (Update) your Azure AD application to access Microsoft Graph API. This step will ensure that your application can successfully retrieve an access token to invoke the Microsoft Graph Rest API on behalf of your users. To do this, follow the steps here.
- For redirect URI, use "https://global.consent.azure-apim.net/redirect"
- 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.
- For API permissions, among other required permissions under "Microsoft Graph", please make sure "User.Read" is added. "User.Read" permission is required in order to login the current user and retrieve relevant information.
We now have a valid Azure AD application that can be used to get permissions from end users and authorize calls to Microsoft Graph. The next step for us is to create a custom connector.
Deploying the sample
Run the following commands and follow the prompts:
paconn create --api-def apiDefinition.swagger.json --api-prop apiProperties.json --secret <client_secret>
Supported Operations
The connector supports the following operations:
Get a task
: Get an existing Planner taskCreate a task
: Create a new task in PlannerUpdate a task (V2)
: Update an existing Planner taskAdd assignees to a task
: Add assignees to an existing Planner taskRemove assignees from a task
: Remove assignees from an existing Planner taskGet task details
: Get the task details for an existing taskUpdate task details
: Update the task details for an existing taskList tasks
: List the tasks in a planList my tasks
: List the tasks assigned to meList buckets
: List the buckets in a planCreate a bucket
: Create a bucket in Planner for the specified plan and groupList plans for a group
: List plans owned by the group specified