I had task for creating GDPR solution that anonymizes data. We were first thinking building it with plugin and Power Automate but that solution seemed to be too complex to build and maintain. I discussed with GitHub Copilot and it suggested Azure Function. With my experience of handling complex data models and lots of data, I think Azure Function and C# is the best solution. Even I’m not fan of writing C#, since I’ve been doing it for 18 years, I know that GitHub Copilot will do the most of my work for it.
Now was time to get help from other Copilots as well
I chat my pall M365 Copilot – I do discuss with Copiltots more than my colleagues 🙁
I want to anonymize data after certain period of time. I will write a Azure function to do it but I need to configure the data. I want to create data model and model-driven app for the configuration of tables and related tables which the Azure function will use. Could you plan the table structure for this? And then propose prompt for Github copilot
🧱 Data Model Design for Anonymization Configuration
Here’s a proposed table structure for your configuration app:
1. Anonymization Configuration
- Name (Text)
- Target Table Logical Name (Text)
- Primary Key Field (Text)
- Anonymization Delay (Days) (Whole Number)
- Is Active (Yes/No)
- Notes (Multiline Text)
2. Field Anonymization Rule
- Name (Text)
- Anonymization Configuration (Lookup to Anonymization Configuration)
- Field Logical Name (Text)
- Anonymization Type (Choice: Null, Replace with Placeholder, Hash, Custom Function)
- Replacement Value (Text, optional)
- Order (Whole Number)
3. Related Table Configuration
- Name (Text)
- Parent Configuration (Lookup to Anonymization Configuration)
- Related Table Logical Name (Text)
- Relationship Name (Text)
- Cascade Delete (Yes/No)
- Notes (Multiline Text)
🧠 GitHub Copilot Prompt for Azure Function
Here’s a prompt you can use in GitHub Copilot to help generate the Azure Function logic:
Create an Azure Function in C# that runs on a timer trigger. It connects to Dataverse using the SDK, reads active records from a custom table called "Anonymization Configuration", and for each configuration: 1. Retrieves records from the target table where the creation date is older than the specified anonymization delay. 2. For each record, applies anonymization rules defined in the related "Field Anonymization Rule" table: - If the rule is "Null", set the field to null. - If "Replace with Placeholder", use the provided replacement value. - If "Hash", hash the original value using SHA256. 3. Optionally processes related tables defined in "Related Table Configuration" by either anonymizing or deleting related records. 4. Logs the anonymization actions and errors. Use dependency injection and environment variables for configuration. Include retry logic and error handling.
I copied table names and fields. Added word table before numbers and put them into maker portal table designer Copilot.

Then it was time to create the model-driven app. If I had done this in maker portal front page, I would have continued directly to app creation. But I wanted to have these tables inside my solution, I did not. I could added them into solution afterwards but I’m learning…

I added the created tables as pages in the app. Maybe now I should really look what fields there are?

Going trough the user interface I think it looked OK but I don’t need the owner value. I think I will fine tune other columns as well once I have generated the Azure Function code an tried this first. All my life I have been designing everything such precises way but maybe this is vibe coding. Let’s see what we get and then tune it to suit our purposes.

Next post is about creating Azure Function with GitHub Copilot and following is the final solution made with Power Automate to read these configurations and do the anonymization.