Skip to content

Deployment guide

Abhijeet Bodhankar (Tata Consultancy Services) edited this page May 14, 2020 · 12 revisions

Prerequisites

  • Sign up for Power Apps
  • You must have a valid SharePoint Online license and permission to create lists and store data for the apps
  • Sign up for Power Automate
  • Office 365
  • A copy of the Attendance app zip package

Step 1: Create a New Team for Staff Members

Create a Team on Microsoft Teams for staff members. Members of this team will have access to use the Attendance App (suggested team name: Attendance )

  1. Open Teams desktop app or open https://teams.microsoft.com/go#

  2. Select Teams tab in the left menu bar and click on Join or create team button.

  3. Click on Create Team button.

  4. Select Staff as Team type.

  5. Add team name (suggested team name: Attendance ) and click Next

  6. Add all staff members. It is recommended to add only staff members who have the authority to take attendance.

  7. Once the Attendance Team is created successfully, new SharePoint site with same name also gets created.

Step 2: Convert the Microsoft Teams created for attendance into a security enabled group

If the attendance app needs to be shared with the staff members who are a part of the team created in the previous step, the Office 365 group must be converted to a security enabled group per the below steps. Once this step succeeds, any new staff member added to the Attendance Team will automatically have access to capture attendance using the app.

  1. Go to Azure Portal > Manage Azure Active Directory > Groups (under Manage on the left side pane) > Select the appropriate group > Copy the Object Id.

  2. Open Windows PowerShell (confirm you are running as an Administrator )

  3. Install the Azure AD PowerShell module

  4. Connect to Azure AD

    Connect-AzureAD

  5. Get the group details using the below command. In the output, ensure the property** SecurityEnabled is set to True**:

    Get-AzureADGroup -ObjectId <ObjectID> | select *

  6. If the Security enabled is set to False, use the below command to reset the value to True and press enter

    Set-AzureADGroup -ObjectId <ObjectID> -SecurityEnabled $True

Step 3: Create SharePoint Lists

Data for the attendance app is stored in SharePoint lists. The flows in the package will create the SharePoint lists to store attendance data.

  1. Open Power Automate

  2. Ensure that the environment belongs to your tenant

  3. Select My flows from the left navigation pane.

  4. Select Import on the command bar.

  5. Upload the CreateSharePointLists.zip package from the GitHub repository.

  6. Add a SharePoint connection for the new flow by selecting the Select during import link and completing the form.

  7. Select + Create new

  8. Select + New Connection on the top

  9. Select SharePoint by clicking +

  10. Select Connect Directly (cloud-services) and select Create

  11. Enter your credentials and a new SharePoint Connection will be listed.

  12. Go back to the previous tab on Automate and click on Refresh list.

  13. Select your connection and click on Save.

  14. Go back to the previous tab on Automate and click on Refresh list , select your connection and click on Save button.

  15. Click Import button. Following a successful import, click Open flow.

  16. Go to your Microsoft Teams – team that you created for the class, go to Files tab, click on Open in SharePoint button.

  17. Copy the site url from the new SharePoint site that opens up in new tab. For e.g. – “https://contoso.sharepoint.com/sites/classX”

  18. Select Run on the top menu

  19. Click on Continue on the right side of the window.

  20. On the next step , paste the Url copied in Step 19 above and click on Run Flow.

  21. Click on Done. Click refresh button to check if flow executed successfully. Once the flow is successful, the SharePoint lists should be installed.

  22. This can be checked by navigating to the SharePoint site (Open the Attendance Team on Microsoft Teams > Files > Open in SharePoint ). The SharePoint lists would be added here.

Step 4: Import Package in Power Apps using zip file

  1. Navigate to Power Apps.

  2. Click on Apps in the left side pane and click on Import canvas app

  3. Import the AttendanceApp.zip zip file

  4. Power App will redirect to details page.

  5. In package details page, click on select during import for SharePoint connection in import setup column.

  6. Click on Create new button in the popup. The page will open in a new browser tab.

  7. Click on Create a connection button.

  8. You will be able to see the list of available connections. Click on + for SharePoint connection.

  9. Check Connect directly (Cloud services) option in the popup and click and on Create button.

  10. Login to confirm complete connection set up.

  11. Navigate back to the import package tab. Once the connection is created, you will be able to see the connection in the Import setup dialog.

  12. If you are not able to see the SharePoint connection, click on Refresh List button in the dialog.

  13. Click on the connection name to select it and then click on Save.

  14. You will be able to see that SharePoint is connected to your tenant.

  15. Repeat the steps from #5 for One Drive for Business connection.

  16. You will be able to see One Drive and SharePoint connection imported in your tenant.

  17. Click on Import button at the bottom of the page.

Step 5: Edit Data source

  1. Click on Open app link when zip package is successfully imported. You will be redirected to Power Apps portal.

  2. Click on Open menu at the left side > Power Apps > Attendance App which you have imported.

  3. The app will request your permission to use all the listed data connections.

  4. Once the app opens, in the horizontal menu, click on View and select Data sources.

  5. Search for SharePoint and select it.

  6. Enter the newly created SharePoint URL in pop-up window.

  7. Choose SessionMetadata, AttendanceRecord lists and select connect.

  8. Publish the app by selecting Save on the file menu (on the left edge), and then select Publish.

Step 5: Edit Flow Data source

  1. Open Power Automate

  2. Select the flows (ExportAll, ExportStudent) connected to Power Apps. Go to the flow (ExportAll) and click on edit.

    Now change the site address to new SharePoint site which you have created in step 2.

  3. Now select AttendanceRecord as List Name which you have created in step 2. Save the flow

  4. Repeat the same step for another flow (ExportStudent).

Step 6: Share Power Apps

  1. Admin needs to share the app to all individuals who will be using the app.

  2. Open https://make.preview.powerapps.com/

  3. Go to Apps menu in the left menu bar and you will be able to see the app you have imported.

  4. Click on 3 dots (Options) for your app and click on Share. The security enabled group created in Step 2 should be visible to add as below. This is required to allow members to access the attendance app.

Step 7: Adding Attendance App to Teams

  1. Select the imported app, click on Add to Teams and then click on "Download App" to download the app

  2. Go to the created Staff Team and click +. You can find detail steps for embedding Power Apps here

  3. Choose Power Apps , Attendance App , and click Save. You will be able to see the app in the tab.

  4. [Optional] Teams Adminstrators can sideload the application for entire organization by uploading the zip package in Teams -> Apps (in the left menu) -> Upload a Custom App.