Getting started - OfficeDev/microsoft-teams-apps-buildingaccess GitHub Wiki
The Building Access applications provide an easy way for users to request access to a place of work. This is composed of three Power Apps:
Building Access: for employees to request access to a workspace
Building Admin: for administrators to control system side settings and data, such as building capacity
Building Security: for building security personnel to validate employee access
This walkthrough includes:
- Building Admin: Entering key reference data as an administrator
- Building Access: Requesting building access as an employee
- Building Access: Scenarios when employee access is automatically approved
- Building Access: Approving a employee request for building access
- Building Security: Check in and Check out a user on the day of their request
- Gathering insights from the Power BI dashboard.
Architecture Model
Reference Data
The application can be tailored by an administrator for your organization using the Building Admin app.
Settings
It is important that admins configure key settings using the Building Admin App. To configure settings:
- Navigate to Building Admin App.
- Click on Settings. This brings up the settings screen.
- Configure the settings and click Save.
Settings Description
Key app settings are described below:
-
Limit requests to x days in future: This is the number of days in future that users can make reservations. By default, the value is set to 14.
-
Error message when request date exceeds limit: This message appears in the Building Access app if a user tries to make a reservation for a date that is after the allowed limit as defined in the setting above.
-
Admin TeamID: This is the ID of the Admin team's Microsoft Team. The Admin team receives approval adaptive card in the channel configured below if manager information is not configured for requestor in Active Directory.
-
Admin Teams Channel ID: This is the ID of the Admin team's Microsoft Team's channel. This channel receives approval adaptive card if manager information is not configured for requestor in Active Directory.
-
Show inline approval buttons on approvals: If set to On, this allows managers to approve the requests individually from within the Building Access App. If this setting is switched off, managers can only bulk approve requests. With this setting set to "on" each line item has its own approve/reject button. With this setting set to "off" approvals are only done by checking each item and selecting an option at the bottom of the screen.
-
Enable Safety Precautions feature: If set to On, the Safety precautions feature is available in the Building Access App. If set to Off, the Safety Precaution feature does not appear in the Building Access App for the users to select.
-
Require Key Question completion before creating reservations: If set to On, users are required to answer the Key Questions before making a reservation to a building. If set to Off the Key Questions screen does not appear in the Building Access App.
-
Key Questions failure message: If the users are required to complete key questions as per the setting above, the app requires them to answer No to all questions. If the user answers Yes to any of the Key Question, they are not allowed to make a reservation. This setting is the message that appears in Building Access App when the users answers Yes to any of the key questions.
Buildings
Buildings are bookable entities which can be reserved by users for specific dates. A Building has following properties:
- Building Name: Name of the building.
- Address: Building address which should include postcode.
- Country: Country where the building is located.
- Building Type: A building can be one of two types:
- Monitored Building: This type of building is monitored by security personnel who are responsible for making sure that users follow protocol and check the employee into and out of a building.
- Unmonitored building: This type of building is not monitored by security personnel. Users are responsible for checking in and checking out.
- Spaces: Each building has associated spaces. For instance, a building can have a first floor and a second floor. More information on spaces is listed in the next section.
- Seats: The total number of bookable seats in a building is an aggregation of seats in each associated space. For example, if first floor has 30 seats and second floor has 40, a building has 70 total number of bookable seats.
- Auto-Approval Threshold: This is a percentage value which defines how many seats out of the total number of seats in a building will be auto approved. Any requests outside the threshold will require manager's or admin approval. For instance,
- If building has 70 total number of bookable seats,
- If Auto-Approval threshold is 20%
- Request for the first 14 seats are auto approved.
- Any request for seats after the first 14 will need manager or admin approval.
- Key Eligibility Criteria: This informs employees of precautions, special scenarios (for example, special parking or entrance restrictions) or necessary special equipment needed to use this building.
- Onsite Access Instructions: Instructions to be followed when onsite.
- Status: Status of the Building. Draft buildings cannot be chosen for reservation by the Users within Building Access app. Published can be chosen for reservation within Building Access app.
Configure Buildings
Create Building
To create a building:
- Navigate to Buildings Admin App.
- Click on Buildings.
- Click Create New.
- Enter all the required information marked by (*) asterisk.
- You will notice that at this stage, the building Status is set to Draft and is disabled. This is because the buildings have not been configured with any spaces yet.
- Once all required information has been added, the Save, Save and Configure buttons are enabled.
- Click Save and Configure Spaces to add Spaces to the building.
- This takes you to a screen listing the building's spaces. Click New Space to add a space to this building.
- Click New Space.
- Enter Name of the Space and Capacity.
- Add more spaces if required. Once finished, click Save and next. This takes you to a screen to specify a default request approver for the building if required. Check the check box if you want to specify a person as the default approver and select the individual by using the dropdown. This is an optional step and you can choose to not specify a default approver.
- Click on Publish if you want to make the building available for selection. If not, click on Save as draft. You will return to the screen which shows you the list of buildings configured.
Update Building
- Navigate to Building Admin app.
- Click on Buildings. This will bring up a list of all configured buildings.
- Click on the Edit icon.
- This will bring up the Edit form.
- Make edits and Save.
Safety Precautions
Safety precautions can be used by organisations to relay information to employees. Published safety precautions appear in Building Access App. Safety precautions have following properties:
- Title: Title of the article.
- Description: Summary description of the article.
- Country: Country the article is relevant for.
- ResrouceURL: The URL to an external web page for more information.
- Status: Draft articles are not available to users in the Building Access App. Published articles are available to view in the Building Access App.
Create Safety Precaution
- Navigate to Building Admin App.
- Click on Safety precautions. This brings up the list of Safety precautions articles.
- Click New safety precaution button.
- Enter all the required information marked by (*) asterisk.
- Once all the required information is added, the Publish button is enabled.
Edit Safety Precaution
- Navigate to the Building Admin App.
- Click on Safety precautions. This brings a list of configured Safety precautions articles.
- Click on the Edit icon.
- Make required changes.
- Click Save.
Eligibility Questions
Eligibility questions are Yes/No screening questions which a user must answer before making a reservation for a building. These questions must be phrased so that a "no" answer is desired. If an employee answers "yes"; to any of these questions, they will not be permitted to reserve building space. Administrators can disable this functionality within the Settings area of the Buildings Admin app. Eligibility Questions have following properties:
- Question: Question to be asked.
- Status: Draft question are not available in the Building Access App. Published questions appear in the Building Access app.
Create Key Questions
- Navigate to Building Admin App.
- Click Key Questions.
- This brings a list of Key Questions.
- Click Create New.
- Enter value in the Question field, this enables the Publish button.
- CLick on Publish, if you are ready to make this question visible in the app. If not click on Save as draft.
- Click Save.
Edit Key Questions
- Navigate Admin App.
- Click Key Questions.
- This brings up the list of Key Questions.
- Click on the Edit icon.
- Make required changes.
- Click Save.
Requesting Building Access
-
Navigate to the Building Access App.
-
Click New Request.
-
This brings up the Eligibility Questions screen. This screen will not appear if your admin has switched off the Eligibility questions feature.
- Answer by giving response that applies to you.
- If you answered Yes to any of the questions, your responses are saved and you are directed to a screen informing that you are not eligible to make a booking.
- If you have answered No to all questions, you are directed to the Buildings Screen.
- Search for the building you want to make reservation for or select from the list of your recent buildings.
- Once the building has been selected, read the eligibility criteria if provided.
- Add Business Reason for Access and Select Save and Continue.
- On the next screen Select date and space for booking.
- Select the date that you want to make a reservation for.
- If you already have a booking for the date selected, you will receive the message below with your existing request listed.
- If you do not have an existing request for the selected date, you will see the space available for selection. You can specify a range of dates also in the same request if you want to access the same building and space for those dates. If you have specified a range of dates and if the space is not available for some dates in the range, it will be appropriately shown.
- You can make any necessary changes to your reservation and Click on Save and next. You will be presented with a screen that shows the individual to whom the request will be sent for approval. It will either be the default building approver as configured for the building or the user's manager. If enabled through the settings app, you will be able to see the option to specify a different approver for your request other then the default approver. Click on the checkbox and select a individual from the list. The request will now be sent to the selected individual for approval
If no default approver or manager details are found then the request will be sent in a team on admins on Microsoft teams.
- Click on Submit button to submit the request. A confirmation message will be displayed. On clicking of 'X' mark, you will be redirected to your list of requests.
Approving Building Access Requests
If requests for building seats has reached the maximum allowed threshold, all the subsequent requests require approval. Approvals are managed using the BARNotifyApprover flow. Access requests could be assigned to requestor's manager or admin team based in the requestor's manager record in Active directory.
Approval assigned to requestor's manager
An approval task is assigned to requestor's manager as defined in Active the directory. Request approval could be done in one of the following two ways
Approval using Teams
- Requestor's manager receives the approval adaptive card in their Teams' chat.
- Click on Chat button with the requestor from within Teams by clicking the Chat button.
- Click on Approve button, this marks the request as approved and sends a notification to requestor suggesting that their request has been approved.
- Click on Reject Button to reject the request; in this case they are required to give a reason for rejection.
- Clicking send marks the request as rejected and sends a notification to requestor with the rejection reason suggesting that their request has been rejected.
- Requestors can view the status of their request in the My Request section of the building access app.
Approval using Building Access App.
- Requestor's manager will see a section named Approvals on the home page. This suggests that there is a pending approval task assigned to the user.
- Clicking the Approvals Button brings up the approval screen.
In-line approvals
- If the admins have enabled In line approvals. Managers will be able to submit their approval for each request individually.
- Clicking on Approve button, approves the request. Requestors will be able to view the status of their request from the My Request section of the Building Access App.
- If request is rejected. Managers are required to enter a reason for rejection.
- Once the request is rejected, Requestors will be able to view the status of their request from the My Request section of the Building Access App.
- On selecting the requests, requestors will be able to view the rejection reason given by the manager.
Bulk Approve
Managers can also choose to bulk approve requests. This could be because the admins have turned off the In-line approval feature. In this case:
- Managers can select the Select All checkbox to select all requests or select checkbox next to each request to select them.
- Clicking on the Approve Selected button marks all the selected requests as approved. Requestors will be able to view the status of their request from the My requests section of the Building Access App.
- If Reject Selected button is selected. Managers are required to enter a reason for rejection.
-
Once the request is rejected, Requestors will be able to view the status of their request from the My requests section of the Building Access App.
-
On selecting the requests, requestors will be able to view the rejection reason given by the manager.
Approval by admin team.
If a requestor does not have a manager assigned in Active Directory, an approval task is assigned to the admin team as defined in the settings area of the Building Admin app. In this case,
- Admin Team will receive the approval adaptive card within the Microsoft Teams' channel as defined in the settings area of the admin app.
- Click on Chat to chat to the requestor.
- Click approve, this marks the request as approved and sends a notification to requestor suggesting that their request has been approved.
- Click Reject, this marks the request as rejected; in this case they are required to give a reason for rejection.
- Clicking send marks the request as rejected and sends a notification to requestor with the rejection reason suggesting that their request has been rejected.
- Requestors can also view the status of their request in the My Request section of the building access app.
Managing Entry and Exit for Unmonitored Building
Entry to the unmonitored buildings is not managed by security personnel. Marking entry and exit is the responsibility of the requestor. It is only possible to check in to your request where the request date is today's date.
Check-In and Check-Out
To check in to a building.
- Navigate to Building Access App.
- Click on Go to Request button. This will take you to your request for access to the unmonitored building.
- If your request has been approved. You will see options to Check In and Check Out.
- Please note, that you could withdraw request at this stage.
- Click on Check-In. This updates the Check-In time, and disables the option for Withdraw request
- Clicking Check-Out checks you out of the building and updates the Check-Out Time.
Managing Entry and Exit to a Monitored Building using the Building Security App
Entry to Monitored building is managed by security personnel present at the building. The security personnel use the Building Security App to Check In and Check Out users. It is only possible to check in to your request where the request date is today's date.
Login to Building Security App
- At the start of each security shift, Open the Building Security App.
-
Use the Select Building button to select the building that you are managing security for. Clicking Select Building will bring up a list of buildings.
-
On selecting a building, the default time slot selected will be for the entire day. Click Save and Continue.
-
This selects a building and presents a brief summary of requests for the selected building and time slot to the security personnel.
- Summary for selected building includes:
- Approved: Number of Approved requests for today
- Arriving: Number of users who are approved and not checked in for today
- Checked-in: Total number of checked in users for today
- On Site: Users who have check in and have not checked out for today.
Request user for their QR code.
- To retrieve QR code users can:
- Navigate to Building Access App.
- Click on Go To Request.
- Click on Go to Request button. This will take you your request for access to the monitored building with the QR code.
Use QR code
- Click on Validate Access Key to scan the QR Code
- You will now be directed to the User Request with Check In and Check Out button.
Use Request List
- Click on the Requests List. This brings up list of requests for the selected building.
- Search using Access Key, Requestor or Space. Please note, Access Key is denoted above the User's QR code.
- Select the request.
- You will now be directed to the User Request with Check In and Check Out button.
User Request
- You can use the Teams' option to chat to the manager.
- Click on Check-In. This updates the Check-In time and checks in the user.
- Note the updated values on the home screen.
- Click on Check-Out. This updates the Check-out time and checks out the user.
- Note the updated values on the home screen.
Managing access for pending requests
There could be instances where a user requires access to the building and their request for access has not yet been approved by their manager. In this instance, security can chat with user's manager and grant access to the user. To do this security user can:
- Login to the Building Access Security App.
- Follow the instructions above to scan request QR code.
- Or you can search for User's Access Key from the Request List. Make sure to keep the Pending Approval check box checked. Click on the request.
- You will be directed to User's request with status Pending Approval
- You can click the Teams icon to chat to the manager re the status of User's request.
- You can check Check-In. This approves the user's access request and checks them in to the building.
- Click Check-Out to check user out of the building.
Updating the Applications
If you have already completed the steps for installing the apps, it is not necessary to redo every step again. Follow these steps to import the individual app or flow which you would like to update.
Start by downloading the new BuildingAccessApp.zip file from this github repository. See the Latest Update section for a table of the latest versions.
Important: updating an app will replace any customizations you have made to the template. Please document any revisions to menus and formulas separately before proceeding. You can also save the original app to your computer as an .msapp file and open it in another browser tab to copy content over to the new version. Note that you can always revert to a previous version by accessing the version history of an app.
To update the app:
- Extract an app you would like to update. For example, if you want to update the Building Access app.
- Go to make.powerapps.com
- From the left pane, click Apps.
- From the top menu, click Import canvas app.
- In the Import package screen, click on Upload and browse for BuildingAccess.zip.
- Once you have selected the file, the screen will change to the import experience.
- Instead of creating a new app as done in the deployment instructions, Click Create new to reveal more options.
- Change the setup dropdown to Update.
- Select the existing app that you want to update. In this case BuildingAccess App.
- Click Save.
- Within related resources if you have any associated flow. Click Create as new to reveal more options.
- Change the setup dropdown to Update.
- Select from the existing flows the flow to update. In this case BARCreateRequests.
- Click import and wait for the import to complete.
- When the import is complete, open the app in PowerApps studio.
- Click Save.
- From the ribbon, click View > Data sources. In the left pane for Data sources, remove the existing connections to SharePoint.
- In the same left pane for Data sources, type 'SharePoint' into the search bar at the top.
- Select SharePoint and your connection. A pane will appear on the right to browse for the exact site and lists.
- In the right pane, select the SharePoint site where your lists for Building Access are located. If the site does not appear in this list, type its URL in the field at the top of the pane.
- Click Connect.
- Save and publish the app: File > Save. Publish.
To update a flow:
- Extract the flow you would like to update. Note that if you have already deployed the SharePoint lists using the DeploySPLists flow, it is not necessary nor possible to create them again in the same site as they already exist.
- Go to flow.microsoft.com
- Sign in.
- From the left pane, click 'My flows.'
- From the top menu, click Import.
- Browse for the zip file you extracted. The page will change to the import experience.
- Instead of creating a new flow as done in the original setup instructions, click "Create new" to reveal more options.
- A pane appears on the right. Below Setup, change the drop down menu to "Update."
- A list of flows in the environment appears in the right pane. Select the flow which you would like to update.
- Select a connection for each connection required.
- Click import and wait for the import to complete.
- Flows that are imported for the first time may be disabled. It may be necessary to edit the flow and in its details page, click Turn on from the top menu.
- Follow the steps in the deployment guide to update triggers and Site Url variables to the Url of the SharePoint site where your lists for Building Access are located.
Language translations
All the applications have been designed to be translated to a language of choice. All the language translations are managed using the colTranslations.xlsx file that can be downloaded from the GitHub repository.
Understanding translations
Here is some key information about the translation file
- Download and extract the BuildingAccessApp.zip.
- And open the coltranslations.xlsx file.
- The file contains four sheets which in turn constitutes of translation tables.
- The first two sheets User and User Extended which have the tables colTranslationsUser and colTranslationsUserExtended respectively are being used in the Building Access app. colTranslationUser should be used for updates.
- Admin tab with table colTranslationsAdmin is being used in Building Admin app.
- Security tab with colTranslationsSecurity table is being used in the Building security app.
- Each table is made up of 2 key columns i.e. Locale and IsSupported. PowerApps rely on these columns to decide which language to use.
- Rest of the columns are labels that are translated.
PowerApp translation formulas
- All PowerApps manage translation on App start using the Language() function.
- The excel table data sources are then filtered using the language detected.
Updating the translations
Some of the translations might not be accurate, as they have been generated using an automated process. In this case, you can choose to update them. To update:
- Download and extract the BuildingAccessApp.zip.
- And open the coltranslations.xlsx file.
- Open the PowerApp where the translation for the label needs to be updated. In this case we will use the Building Access app.
- Select the component label for which needs to be updated.
- In the image above lblEligibilityCriteria has been selected.
- The text property states column name to be updated within the excel file. In this case ScreenBuildingEligibilityLabel.
- Search for ScreenBuildingEligibilityLabel within the colTranslationsUser table within User sheet in the excel file.
- Update the column value for your locale row.
- Save the file.
- Switch to the data sources section of the Building Access App.
- Remove colTranslationUser excel data source.
- In the data source section search for excel and select Import from Excel.
- Browse and select the excel file you modified.
- Once selected, you will be asked to select the table to import the data from.
- Select colTranslationUser
- Press Connect.
- New Data source appears.
- Switch to Tree View section.
- Click Run on Start to run formulas on App Start and load the labels.
- Save and Publish
Note
- Currently excel data source can read first 100 columns from the excel table.
- If your translation table exceeds 100 columns, your powerapp might not be able to read the column value.
Testing Translations
Once the translations have been configured, you can validate this by configuring browser language or changing app language within Microsoft Teams client application.
Changing Browser Language
- Open Microsoft teams within Microsoft Edge.
- Navigate to Building Access App.
- Click on elipisis(…) on the top right corner of the browser and click on Settings.
- Click on Languages on the left-hand side menu.
- Click Add Languages and Select Language of your choice and Click Add.
- Once language has been added, click ellipsis(…) next to the Language.
- Select Move on the top.
-
Once you see the language on top, click ellipsis(…) next to the Language and select the option to make this the default language in the browser
-
Restart the browser. It should now be translated to the selected language.
Change Microsoft teams App language
To test app translations within Microsoft Teams client app:
- Click on your photo on the top right of the Teams application and click settings.
- Under General Settings, change the App language to language of your choice.
- Click Save and Restart.
- The App will load in the language selected.
Gaining Insights with Power BI
Building Access Power BI
The Power BI report provides insight on data that has been collated from the Building Access application.
There are 4 reports:
- Today's snapshot – provides details of today's request by each building. Using the map, you can drill down.
- Today's access report – allows you to filter on data with today's request data.
- Contact tracker – allows you to check who has been in the building at the same time.
- Building 360 breakdown – filters by date allows users to view historic and future requests.
Each of the above reports are created using visuals to breakdown and summarise data. Filters are provided on most pages so the user can further slice and dice the data as required.
Today's snapshot
This view provides details of all the request raised for the day the report is viewed. Tiles at top provide breakdown of values in the following categories:
These are the total values for published buildings.
Also included is a map, which shows all the buildings that you have set up on the application. You can scroll over each icon on the map to view breakdown of todays data. A drill down view can also be accessed when you right click on a location and select the drill down report:
The drill through page allows you to see details of the request that have come in for example, name and check in/out times of the individuals that have entered the buildings. The page also has graphs which allow you to further analyse the activity for the day.
Today's access report
This report is similar to Todays snapshot report, but it allows you to further filter data to your requirements using the filters provided.
You can select one or a combination of the filters on the page and report will provide data based on the filters you selected.
Contact tracker
The Contact tracker report allows you to check who has been in the building as the same time as another person. The purpose of this report is if someone has fallen ill you can use this report to check who that ill person may have been in contact with.
Filters
The filters on this page allow you to pick specific individuals, building, country, or a check-in data. Once you have narrowed down your selection you can select that person and view who else has potentially been in contact with that person.
Click on any person within the Building access request details for todays table and the Person in contact with box will be populated with the individuals that have been in the same building, floor and time as that selected person.
Building 360 breakdown
This report allows you view historical and future data. This report allows you use the date filter to view past and future data based on the request date.
The report return data on a summary levels using charts and a matrix so you can view the details for each building and floor.