管理資料Managing data

了解如何在 Common Data Service 中儲存和模型化資料。Understand how to store and model data in the Common Data Service. 定義和使用對應至您商務資料和處理程序的實體,然後使用自訂實體來擴充通用資料模型。Define and use entities that map to your business data and processes, and extend the common data model with custom entities. 使用以角色為基礎的安全性來控制實體存取權。Use role-based security to control access to entities. 直接在服務和 Excel 中處理資料。Work with data directly in the service, and in Excel.

You will learn how to...

Common Data ServiceThe Common Data Service

資料是商務應用程式和處理序的核心 - 來自 Excel、內部部署來源 (如 SQL Server) 和雲端來源 (如 Salesforce 和 SharePoint Online) 的資料。Data is at the heart of business applications and processes - data from Excel, from on-premises sources like SQL Server, and cloud sources like Salesforce and SharePoint Online. 資料可能與客戶、銷售、員工和其他許多項目相關,但其共同點是資料對您的企業而言很重要,而且在您於 PowerApps 中建置的應用程式中扮演重要角色。Data can be related to customers, sales, employees, and many other things, but the common theme is that data is crucial to your business, and it plays a key role in the apps you build in PowerApps. 到目前為止,您已在本課程中看到並使用不同類型的資料來源,而我們稍早也已介紹 Microsoft Common Data Service。You have seen and worked with different types of data sources so far in the course, and we introduced the Microsoft Common Data Service earlier. 在這個章節中,我們會花一些時間詳細解說、說明相關優點,以及示範如何使用此服務。In this section, we'll spend some time getting into the details, explaining the benefits, and showing you how to use the service.

了解此服務Understanding the service

讓我們從幾個圖表找到方向。Let's get oriented with a couple of diagrams. 您之前可能已看過第一個圖表,它會顯示 Microsoft 商務應用程式平台的元件。You might have seen the first diagram before - it shows the components of the Microsoft business application platform. 您很明顯已熟悉 PowerApps,但您可能也使用過 Microsoft Flow、Power BI 或其他元件。You're obviously acquainted with PowerApps by this point, but you might have also used Microsoft Flow, Power BI, or other components. 您會發現所有元件的 Common Data Service 及連接器和閘道都相關。What you see is that the Common Data Service and connectors and gateways are relevant for all of these components. 現在,Common Data Service 主要搭配 PowerApps 和 Microsoft Flow 使用,但它可及時供其他元件使用。Right now, the Common Data Service is used primarily with PowerApps and Microsoft Flow, but it will be available for other components in time.


您現在已了解 Common Data Service 的適用位置,讓我們看看其組件。Now that you understand where the Common Data Service fits in, let's look at its parts. 將 Common Data Service 視為一個階層。Think of the Common Data Service as a hierarchy. 基本上,此服務會以可調整又可靠的方式儲存資料,並可讓多個應用程式使用此資料。At the bottom level, the service stores data in a scalable and reliable way, and makes the data available so that multiple applications can use it. 下一個層級是通用資料模型,其中包含應用程式與商務程序中所用的許多實體︰帳戶、連絡人、產品和銷售訂單之類的實體。The next level is the common data model that includes many entities used in applications and business processes: entities like Account, Contact, Product, and Sales Order. 您可以擴充標準實體並建立自訂實體,以符合您的商務需求。You can extend the standard entities and create custom ones to meet your business needs.

Common Data Service 架構圖

實體只是用以描述的中繼資料 (欄位名稱、資料類型等) 與您存放其中之資料的組合。An entity is just a combination of the metadata that describes it (field names, data types, and so on) and the data that you store in it. 如果您曉得 Access 或另一個資料庫,實體非常類似資料表。If you know Access or another database, an entity is very much like a table. 我們會在下一個主題中進一步討論實體,但現在請考量使用 Common Data Service 中實體資料的優點︰We will get into entities more in the next topic, but for now consider the benefits of working with entity data in the Common Data Service:

  • 易於管理︰中繼資料及資料都儲存在雲端中。Easy to manage: Both the metadata and data are stored in the cloud. 您不必擔心如何儲存的細節。You don't need to worry about the details of how they're stored.
  • 可輕鬆共用︰您可以輕鬆地與同事共用資料,因為 PowerApps 會管理權限。Easy to share: You can easily share data with your colleagues because PowerApps manages the permissions.
  • 可輕鬆保護︰系統會安全地儲存資料,只有經由您授權的使用者才能看見。Easy to secure: Data is securely stored so that users can see it only if you grant them access. 角色型安全性可讓您控制組織內不同使用者的實體存取權。Role-based security allows you to control access to entities for different users within your organization.
  • 豐富的中繼資料︰直接在 PowerApps 中利用資料類型和關聯性。Rich metadata: Data types and relationships are leveraged directly within PowerApps. 比方說,定義欄位類型 URL,您的資料便會在您的應用程式中呈現為超連結。For example, defining a field type URL will present your data as a hyperlink within your app.
  • 生產力工具︰在 Microsoft Excel 和 Outlook 的增益集中可取得實體以提高生產力,並確保可以存取您的資料。Productivity tools: Entities are available within the add-ins for Microsoft Excel and Outlook to increase productivity, and ensure your data is accessible.
  • 挑選清單︰包含來自一組豐富標準挑選清單的挑選清單,以在您的實體和應用程式中提供快速下拉式清單。Picklists: Include picklists from a rich set of standard picklists to provide quick drop downs within your entities and apps.

建立 Common Data Service 資料庫Create a Common Data Service database

您可在「環境」中建立 Common Data Service 資料庫。You create a Common Data Service database in an environment. 您稍早已在本課程中了解何謂環境,現在快速重述一下要點︰環境是應用程式和其他資源的容器,像是 Common Data Service。You learned about environments earlier in the course, so just a quick recap: an environment is a container for apps and other resources, like the Common Data Service. 每個環境都可以有一個與其相關聯的服務執行個體。Each environment can have one instance of the service associated with it. 如果您是環境的系統管理員,而且想要將服務新增至環境,請遵循下列步驟。If you are an Environment Admin, and you want to add the service to an environment, follow these steps.

首頁 索引標籤,按一下 [建立資料庫]。From the Home tab, click Create Database.

建立 Common Data Service 資料庫

指定您是否要限制資料庫存取,然後按一下 [建立我的資料庫]。Specify whether you want to restrict access to the database, then click Create my database.

指定 Common Data Service 存取權

當處理序完成時,您會看到常見資料模型中包含的所有標準實體。When the process is complete, you see all the standard entities that are included in the common data model. 其中部分實體如下所示。Some of them are shown below.

Common Data Service 標準實體

如果您之前未曾用過資料庫,本主題的某些部分可能為不熟悉的領域。Some of this topic might have been unfamiliar territory if you haven't worked with databases before. 但一般概念相當簡單︰Common Data Service 會提供安全又可靠的方法來儲存資料,並以通用實體 (如帳戶、連絡人、產品和銷售訂單) 的角度處理該資料。But the general concept is pretty straightforward: the Common Data Service provides a secure and reliable way to store data and to treat that data in terms of common entities like Account, Contact, Product, and Sales Order. 我們將在下一個主題中深入討論實體。In the next topic, we'll dive a deeper into entities.

了解 Common Data Service 實體Understand Common Data Service entities

在本節中的第一個主題,我們介紹了 Common Data Service,其中包括 Common Data Model。In the first topic in this section, we introduced you to the Common Data Service, which includes a common data model. 而該模型包含實體。The model in turn contains entities. 實體是共用資料的區塊,可修改、儲存、擷取並與之互動。Entities are chunks of shared data that can be modified, stored, retrieved, and interacted with. 在本主題中,您將深入了解實體、欄位和資料類型。In this topic, you'll learn more about entities, fields, and data types.

標準實體Standard entities

Common Data Model 會隨附一組標準實體,涵蓋各種常見的商務需求。The common data model comes with a set of standard entities that cover a range of common business needs. 一些標準實體如下所示。Some of the standard entities are shown below.

Common Data Service 標準實體

實體會分組成類別,因此很容易看到哪些實體通常會在解決方案中一起運作。The entities are grouped into categories so it's easy to see which ones typically work together in a solution.

功能群組Functional group 說明Description
客戶服務Customer Service 案例服務實體會管理您客戶的問題,包括追蹤、升級,以及文件管理。The Customer Service entities manage issues from your customers, including tracking, escalation, and documentation.
基礎Foundation 基礎實體包含與幾乎每個其他實體群組相關的資訊。The Foundation entities contain information that is relevant to nearly every other entity group. 此群組包含如 [地址] 和 [貨幣] 等實體。This group contains entities such as Address and Currency.
人員、組織及群組People, Organizations, and Groups 這些實體包含一組您可以互動的多種人員與組織,包括員工、約聘人員、捐贈者、義工、粉絲、校友與家族等。These entities encompass a rich set of people and organizations that you might interact with, including employees, contractors, donors, volunteers, fans, alumni, and families.
採購Purchasing 採購實體可讓您建立購買解決方案。The Purchasing entities let you create purchasing solutions.
銷售專線Sales 銷售實體可讓您建立端對端解決方案,範圍從追蹤潛在客戶和機會、到透過連絡人進行追蹤、接受與傳遞訂單,一直到傳送發票。The Sales entities let you create end-to-end sales solutions, from tracking leads and opportunities, to following through with contacts, accepting and delivering orders, and sending invoices.

欄位和資料類型Fields and data types

每個實體都包含一組您無法變更或刪除的預設欄位。Each entity contains a set of default fields that you can't change or delete. 其中有些欄位專用於某個實體,例如連絡人識別碼Some of those fields, like Contact ID, are specific to an entity. 其他則通用於所有實體,像是建立日期時間Others, like Created on date time, are common to all entities. 您可以新增欄位以擴充標準實體。You can extend standard entities by adding fields. 只要按一下或點選 [新增欄位] 並指定新欄位的屬性。Just click or tap Add field and specify the new field's properties.


如果您需要完全不同的實體 (亦即擴充標準實體仍嫌不足),則可建立自訂的實體。If you need an entity that is completely different (i.e. extending a standard entity isn't enough), you create a custom entity. 我們將在下一個主題中討論這個部分。We will cover that in the next topic.

實體中的每個欄位皆具有資料類型,例如數字。The fields in an entity each have a data type, like Number. 具有不同的資料類型,而非單一的泛型資料類型很有用,因為這可讓您的應用程式進行各種酷炫的內容。Having different data types, rather than a single generic data type is helpful because it lets your apps to do all sorts of cool things. 比方說,當您有數字類型的欄位,您的應用程式可以在使用者編輯該欄位時使用滑桿控制項。For example, when you have a field of type Number, your apps can use a slider control when a user edits that field. 您可以從十多個資料類型中進行選擇 - 下列清單顯示一些具代表性的類型︰You can choose from more than a dozen data types - the following list shows some representative types:

  • 基本類型,例如文字和數字Basic types, like Text and Number
  • 更複雜的類型,如電子郵件和電話More complex types, like Email and Phone
  • 特殊的型別,如查閱 (適用於建立關聯性) 和挑選清單 (保留欄位的一組固定值)Special types, like Lookup (for creating relationships) and Picklist (to hold a fixed set of values for a field)

使用實體Working with entities

當您開啟實體時,您會看到大量的資訊和數個可以採取的動作。When you open an entity, you see a lot of information and several actions that you can take. 我們將簡短探討可用的索引標籤,以及您可以採取的動作來管理實體資料。We'll briefly look at the tabs that are available, and the actions you can take to manage entity data.


  • 欄位︰請參閱欄位和資料類型,以及新增欄位,這些都是我們之前討論過的內容。Fields: see fields and data types, and add fields, all of which we discussed above.
  • 索引鍵︰識別實體中每個資料列的欄位,例如連絡人實體的連絡人識別碼。Key: the field that identifies each row in an entity, like Contact ID for the Contact entity.
  • 關聯性︰相關實體之間的連接,例如產品與產品類別。Relationships: connections between related entities like Product and Product category. 我們在下一個主題中可以看到這個範例。We'll see an example in the next topic.
  • 欄位群組︰用來控制各種行為,例如當您在 PowerApps 中建立應用程式畫面時,哪些欄位會自動顯示。Field groups: used to control various behaviors, like which fields to automatically show when you create an app screen in PowerApps.
  • 資料︰在樣本資料和您自己的資料匯入後進行瀏覽。Data: browse sample data and your own data after it's imported.


  • 在 Excel 中開啟:如果您有安裝 PowerApps 增益集,使用此選項來瀏覽和編輯您在 Excel 中的資料。Open in Excel: if you have the PowerApps add-in installed, use this option to explore and edit your data in Excel.
  • 匯入資料︰從 Excel 和 CSV 檔案帶入資料。Import data: bring in data from Excel and CSV files.
  • 匯出資料︰將資料匯出到 Excel 檔案。Export data: export data to an Excel file.
  • 匯出範本︰將實體的結構匯出到 Excel 檔案,以便填入檔案並將其匯入回實體。Export template: export the structure of an entity to an Excel file so you can populate the file and import it back into the entity.
  • 設定刪除︰不適用於標準實體。Settings and Delete: not available for standard entities.

連接到 PowerApps Studio 中的標準實體Connecting to a standard entity in PowerApps Studio

現在您已了解實體是什麼,我們將探討如何連接到 PowerApps Studio 中的連絡人實體。Now that you understand what entities are, we'll look at how to connect to the Contact entity in PowerApps Studio. 按一下 [新增],然後在 [Common Data Service] 下按一下 [電話配置]。Click New, then under Common Data Service, click Phone layout. 您可以在左側看到可用的資料連接,並在右側看到實體清單。You see available data connections on the left and the list of entities on the right. 嘗試自行連接,並從實體產生應用程式。Try connecting on your own, and generate an app from the entity.

連接到 PowerApps Studio 中的實體

在下一個主題中,我們將告訴您如何建立自訂實體,以及實體之間的關聯性。In the next topic, we'll show you how to create custom entities, as well as relationships between entities.

建立自訂實體Create custom entities

Common Data Service 是針對所有企業客戶所設計,從最小的商店到最大的企業皆適用。The Common Data Service is designed for all our business customers, from the smallest shops to the largest enterprises. Common Data Model 包含一組標準實體,可處理許多常見的商務案例,而且如同您在先前主題看到的一般,如有必要,您可以擴充這些標準實體。The common data model includes a set of standard entities that address many common business scenarios, and you saw in the previous topic that you can extend those standard entities if necessary. 但有時您需要全然不同的實體,才可解決特定的業務問題。But sometimes you need something completely different to solve problems specific to your business. 在此情況下您需要自訂實體,而我們在本主題中會教您如何建置。In that case you need a custom entity, and we'll show you how to build one in this topic.

有兩種方式可以建立實體︰There are two ways to create an entity:

  • 從頭開始建立實體。Create the entity from scratch. 這就是我們在本主題中要做的事。This is what we'll do in this topic.
  • 根據另一個實體建立實體,做法是複製其欄位和設定,但不複製其資料。Create an entity that is based on another entity, by copying the fields and settings of that entity, but not its data.

從頭開始建立實體Creating an entity from scratch

在此範例中,我們將從頭開始建立自訂實體,並稱呼為產品檢閱。For this example, we'll create a custom entity called Product review, from scratch. 若要開始,在實體索引標籤處按一下 [新增實體]。To start, on the Entities tab click New Entity. 輸入實體名稱(沒有空格或特殊字元),易記的顯示名稱,且有意義的描述Enter an Entity name (no spaces or special characters), a friendly Display name, and a meaningful Description. 然後按 [下一步]。Then click Next.


在下一個畫面中,您會看到所有標準和自訂實體包含的五個預設欄位。On the next screen, you see the five default fields that all standard and custom entities contain. 按一下 [新增欄位] 來開始自行新增。Click Add field to start adding your own.


在此範例中,讓我們新增四個欄位︰For this example, let's add four fields:

  • 檢閱日期,這是日期欄位,且為必填欄位。Review Date, which is a date field, and is required.
  • 產品評等,這是整數欄位,且為必填欄位。Product Rating, which is an integer field, and is required. 我們可以在這裡使用挑選清單,以讓您指定特定值 (例如 1-5),但是現在我們想保持簡單。We could use a picklist here that allows you to specify only certain values (like 1-5), but we'll keep it simple right now.
  • 檢閱者名稱,這是文字欄位,且不是必填欄位。Reviewer Name, which is a text field, and isn't required
  • 檢閱者註解,這是文字欄位,同樣也不是必填欄位。Reviewer Comment, which is a text field, and also isn't required.

當您滿意實體時,按一下 [建立]。When you're happy with the entity, click Create. 當實體建立時,裡面不會有任何資料。When the entity is created, it doesn't have any data in it. 我們將在下一個主題中示範如何匯入資料。We'll show how to import data in the next topic.


建立兩個實體之間的關聯性Creating a relationship between two entities

由於我們想要將每個檢閱與特定產品產生關聯,因此我們需要建立產品檢閱實體與產品實體之間的關聯性。Because we want to associate each review with a particular product, we need to create a relationship between the Product review entity and the Product entity. 在產品檢閱實體中,在關聯性索引標籤上,按一下 [新增關聯性]。In the Product review entity, on the Relationships tab, click New relationship. 然後選取 [相關實體],並輸入名稱顯示名稱描述Then select a Related entity, and enter a Name, a Display name, and a Description. 按一下 [儲存] 建立關聯性。Click Save to create the relationship.


連接到 PowerApps Studio 中的自訂實體Connecting to a custom entity in PowerApps Studio

連接到 PowerApps Studio 中的自訂實體就像連接到標準實體一般。Connecting to a custom entity in PowerApps Studio is just like connecting to a standard entity. 按一下 [新增],然後在 [Common Data Service] 下按一下 [電話配置]。Click New, then under Common Data Service, click Phone layout. 您可以在左側看到可用的資料連接,並在右側看到實體清單。You see available data connections on the left and the list of entities on the right.

連接到 PowerApps Studio 中的實體

在下一個主題中,我們將示範如何管理 Common Data Service 中的資料。In the next topic, we'll show you how to manage data in the Common Data Service.

管理實體資料Manage entity data

在本主題中,我們將討論 Common Data Service 中的資料管理。In this topic, we'll cover data management in the Common Data Service. 我們在其他主題談過匯入和匯出資料,但我們將花一些時間討論使用 Excel 中的資料。We have touched on importing and exporting data in other topics, but we'll spend more time now on working with data in Excel.

從 Excel 或 CSV 匯入資料Import data from Excel or CSV

在此範例中,我們將把資料從 Excel 匯入到我們在上一個主題所建立的產品檢閱實體。In this example, we'll import data from Excel into the Product review entity that we created in the last topic. 您也可以從 CSV 檔案匯入資料,這是一種移動資料的通用格式。You can also import data from CSV files, which is a common format to move data around. 這是提醒您實體看起來的樣子;反白顯示的區域是我們將在本主題中著重的部分。Here's a reminder of what the entity looks like; the highlighted area is what we'll focus on in this topic.


在實體中,按一下 [匯入資料],然後瀏覽至您想要匯入的檔案。In an entity, click Import data, then navigate to the file you want to import from. 按一下 [顯示對應] 並確保 Excel 檔案中的資料行與實體中正確的欄位相關聯。Click Show mapping and make sure the columns in the Excel file are associated with the right fields in the entity. 當您滿意對應結果時,按一下 [儲存變更]。When you're happy with the mappings, click Save changes. 回到主要匯入畫面中,按一下 [匯入]。Back on the main import screen, click Import.

從 Excel 匯入資料

將資料匯出至 ExcelExport data to Excel

如果您需要在 Common Data Service 外部存取資料,請匯出資料。Export data if you need access to it outside the Common Data Service. 在實體中,按一下 [匯出資料],然後等待 zip 檔案產生。In an entity, click Export Data, and then wait for the zip file to be generated. 開啟 zip 檔案,您就會看到匯出的資料。Open the zip file and you see the exported data. 將資料匯出至 ExcelExport data to Excel

將範本匯出至 ExcelExport a template to Excel

除了下載資料,您也可以下載範本。In addition to downloading data, you can download a template. 範本是 Excel 檔案,其結構可與實體的欄位相符,但是沒有資料。A template is an Excel file with a structure that matches the fields of an entity, but without the data. 下載範本之後,您可手動或以程式設計的方式填入,而且將其匯入回服務。After you download the template, you populate it manually or programmatically, and import it back into the service. 在實體中,按一下 [匯出範本],然後指定您想要的欄位 (在此情況下我選取單一欄位)。In an entity, click Export Template, then specify the fields you want (in this case I selected a single field). 按一下 [匯出至 Excel],然後等待 Excel 檔案產生。Click Export to Excel, and then wait for the Excel file to be generated. 開啟 Excel 檔案,您就會看到匯出的範本具有您所選取的欄位。Open the Excel file and you see the exported template with the fields you selected.

將範本匯出至 Excel

開啟並使用 Excel 中的資料Open and work with data in Excel

我們將探討的最後一件事是在 Excel 中開啟選項。The last thing we'll look at is the Open in Excel option. 如果您有安裝 PowerApps 增益集,您可以使用此選項來瀏覽和編輯您在 Excel 中的資料。If you have the PowerApps add-in installed, you can use this option to explore and edit your data in Excel. 在實體中,按一下 [在 Excel 中開啟],然後開啟檔案。In an entity, click Open in Excel, then open the file. 進行編輯,則增益集便會在服務中建立即時連線至實體,並且填入活頁簿。Enable editing, then the add-in establishes a live connection to the entity in the service and populates the workbook. 您可以在活頁簿中直接編輯,也可以新增和刪除資料列。You edit directly in the workbook, and can add and delete rows. 按一下 [發佈] 以儲存變更。Click Publish to save changes. 您也可以重新整理資料,確保您有最新的複本和篩選資料,篩選資料在實體中有大量資料時特別有用。You can also refresh data to make sure you have an up-to-date copy; and filter data, which is especially handy if an entity has a lot of data in it.

在 Excel 中開啟

這就是 Common Data Service 中管理資料主題的結尾—匯入、匯出和使用 Excel 中的資料。That wraps up the topic on managing data in the Common Data Service—importing, exporting, and working with data in Excel. 在下一個主題中,我們將討論管理資料安全性。In the next topic, we'll talk about managing data security.

Common Data Service 安全性Common Data Service security

在本主題中,我們將討論 Common Data Service 中的安全性。In this topic, we'll cover security in the Common Data Service. 服務會使用以角色為基礎的系統,授與使用者對於資料的權限。The service uses a role-based system to grant users permissions to data. 安全性模型是一個階層,而每個層級代表不同的存取權層級。The security model is a hierarchy, with each level representing a different level of access. 位於最低層級的是在單一實體上獨立建立、讀取、更新和刪除的權限。At the lowest level are individual create, read, update, and delete permissions on a single entity. 這些實體層級權限的集合會形成權限集合。A collection of these entity-level permissions forms a permission set. 然後角色便可使用一或多個權限集合。One or more permission sets can then be used by a role. 角色位於最上層,包含使用者或使用者群組所需的所有權限。A role is at the top level - encompassing all the permissions needed by a user or a group of users.

了解角色和權限集合Understanding roles and permission sets

本課程的大部分,我們都著重在 powerapps.com 和 PowerApps Studio。In most of this course, we've focused on powerapps.com and the PowerApps Studio. 在本主題中,我們會將重點放在 PowerApps 系統管理中心。In this topic, we will be in the PowerApps admin center. 如果您在系統管理中心中按一下環境 (位於安全性下),您會看到環境角色 (我們在上一個主題中討論過)、使用者角色權限集合的索引標籤。If you click on an environment in the admin center, under Security you see tabs for Environment roles (whch we looked at in a previous topic), User roles and Permission sets. 根據預設,有兩個使用者角色︰By default, there are two user roles:

  • 資料庫擁有者是系統管理角色,可提供對所有實體的完整存取權。Database Owner is an administrative role that gives full access to all entities.
  • 組織使用者是指派給所有使用者的預設角色。Organization user is the default role assigned to all users. 此角色會將包含公用資料的實體存取權提供給所有使用者。This role provides all users access to entities that contain public data.


依預設,每個實體有兩個權限集合By default there are two permission sets for each entity

  • 維護提供完整控制權︰建立、讀取、更新和刪除權限。Maintain gives full control: create, read, update, and delete permissions.
  • 檢視提供唯讀存取權。View gives read-only access.

下圖顯示帳戶實體的預設權限集合。The following image shows the default permission sets for the Account entity.


在影片中,我們示範如何建立其他角色和權限集合,以便您可以為應用程式啟用更細緻的存取權。In the video, we show you how to create additional roles and permission sets so you can enable fine-grained access for your applications. 我們建立維護產品檢閱權限集合,可將完整存取權提供給我們在先前主題中所建立的自訂實體,以及我們指派權限集合的 ReviewApp 擁有者角色。We create a Maintain product review permission set that gives full access to the custom entity we created in an earlier topic and a ReviewApp Owner role that we assign the permission set to.

限制對資料庫的存取Restrict access to a database

當我們在先前主題中建立資料庫時,我們都維持開啟資料庫存取權的預設值。When we created a database in an earlier topic, we stayed with the default of open access to the database. 若要變更存取權,在資料庫索引標籤處按一下 [限制存取],然後確認您想要進行變更。To change the access, on the Database tab click Restrict access, and then confirm that you want to make the change.


在受限制的模式中,每個使用者必須具有一或多個角色指派。In restricted mode, every user must have one or more role assigned to them. 角色可以設定為您公司內特定的職位,並指派給屬於該職位的任何人。A role can be set up for a given position within your company, and assigned to any person who is in that position. 使用者也可以根據其所屬的 Azure Active Directory 群組,自動新增至角色。Users can also be automatically added to a role based on the Azure Active Directory groups they belong to.

結論Wrapping it up

安全性可以是很複雜的主題,但只要記住權限階層即可。Security can be a complex topic, but just remember the hierarchy of permissions. 安全性開始於實體上建立、讀取、更新和刪除的權限,這些可形成權限集合,然後便可指派給角色。It starts with create, read, update, and delete permissions on an entity, which can form permission sets, which are then assigned to roles. 它是一個彈性的系統,可讓您以相當精細的方式控制資料存取權。It's a flexible system that enables you to control data access in a fairly granular way.

這就是 Common Data Service 段落的尾聲,同時也是本引導式學習課程的結尾。Well, this brings us to the end of our section on the Common Data Service and also the end of this Guided Learning course. 我們希望您喜歡並且獲益良多,若您有任何意見歡迎與我們分享,並且回來查看,因為我們計劃繼續新增內容。We hope you've enjoyed it and learned a lot - let us know if you have any feedback, and check back because we plan to add content over time. 如立即需要更深入的內容,請查看 PowerApps 文件For more in-depth content right now, check out the PowerApps documentation.


您已完成 Microsoft PowerApps 引導式學習的 [管理資料] 一節。You've completed the Managing data section of Microsoft PowerApps Guided Learning.

You learned how to...


  • Michael Blythe
  • olprod