Configuration/Configuration.ps1

# Provide your Microsoft Tenant ID
$CMPC_TenantId = ""

# Provide your Application ID (Client ID)
$CMPC_ClientId = ""

# Provide your Client secret
$CMPC_ClientSecret = ""

# Define your admin relationship name (all admin relationships must have unique names and cannot exceed 50 characters, for example: "ShortenedCompanyName_$(New-Guid)")
$CMPC_AdminRelationshipDisplayName = ""

# Define your admin relationship duration (maximum number is 730 days: "P730D")
$CMPC_AdminRelationshipDuration = ""

# Define your admin relationship auto extend duration (maximum number is 180 days: "P180D")
$CMPC_AdminRelationshipAutoExtendDuration = ""

$CMPC_AdminRelationshipUnifiedRoles = @'
[
    {"roleDefinitionId": "44367163-eba1-44c3-98af-f5787879f96a", "roleDefinitionName": "Dynamics 365 Administrator", "securityGroupId": "45526904-5f90-4777-8b56-c0833606a118"},
    {"roleDefinitionId": "29232cdf-9323-42fd-ade2-1d097af3e4de", "roleDefinitionName": "Exchange Administrator", "securityGroupId": "7f9b229e-4a1f-4b13-b590-813daa37be0c"},
    {"roleDefinitionId": "31392ffb-586c-42d1-9346-e59415a2cc4e", "roleDefinitionName": "Exchange Recipient Administrator", "securityGroupId": "db54ef0d-1664-4ba2-a818-7037d8e2d6a7"},
    {"roleDefinitionId": "45d8d3c5-c802-45c6-b32a-1d70b5e1e86e", "roleDefinitionName": "Identity Governance Administrator", "securityGroupId": "0b012f2a-1eae-45b0-9a69-9774057035d3"},
    {"roleDefinitionId": "b5a8dcf3-09d5-43a9-a639-8e29ef291470", "roleDefinitionName": "Knowledge Administrator", "securityGroupId": "81e5fc61-36de-4f9b-a949-bfc450e5147b"},
    {"roleDefinitionId": "744ec460-397e-42ad-a462-8b3f9747a02c", "roleDefinitionName": "Knowledge Manager", "securityGroupId": "e9aefb47-eae3-4807-b91b-b6e2f7436867"},
    {"roleDefinitionId": "32696413-001a-46ae-978c-ce0f6b3620d2", "roleDefinitionName": "Windows Update Deployment Administrator", "securityGroupId": "f7b71f1f-4da6-49eb-898d-e32f70841aa7"},
    {"roleDefinitionId": "892c5842-a9a6-463a-8041-72aa08ca3cf6", "roleDefinitionName": "Cloud App Security Administrator", "securityGroupId": "80a4dc1b-2857-4a0d-9d7b-3ed48a8ac0d1"},
    {"roleDefinitionId": "fdd7a751-b60b-444a-984c-02652fe8fa1c", "roleDefinitionName": "Groups Administrator", "securityGroupId": "aef9d6b2-e22f-4474-8ad0-d0be51e9c551"},
    {"roleDefinitionId": "a9ea8996-122f-4c74-9520-8edcd192826c", "roleDefinitionName": "Fabric Administrator", "securityGroupId": "0b652076-651d-4d8c-9304-49eadbc8a653"},
    {"roleDefinitionId": "69091246-20e8-4a56-aa4d-066075b2a7a8", "roleDefinitionName": "Teams Administrator", "securityGroupId": "bd37ec8c-d731-42d8-a824-587a2c86105a"},
    {"roleDefinitionId": "3d762c5a-1b6c-493f-843e-55a3b42923d4", "roleDefinitionName": "Teams Devices Administrator", "securityGroupId": "7fd7f3d4-a39e-49f3-b77f-405952ef4d05"},
    {"roleDefinitionId": "baf37b3a-610e-45da-9e62-d9d1e5e8914b", "roleDefinitionName": "Teams Communications Administrator", "securityGroupId": "cef65734-3386-48fd-8b80-132f7e01cd59"},
    {"roleDefinitionId": "f70938a0-fc10-4177-9e90-2178f8765737", "roleDefinitionName": "Teams Communications Support Engineer", "securityGroupId": "0453eb5b-132c-409c-850e-b6c4d168071a"},
    {"roleDefinitionId": "fcf91098-03e3-41a9-b5ba-6f0ec8188a12", "roleDefinitionName": "Teams Communications Support Specialist", "securityGroupId": "c954f8e7-b229-4755-8a57-e59089a32efe"},
    {"roleDefinitionId": "75941009-915a-4869-abe7-691bff18279e", "roleDefinitionName": "Skype for Business Administrator", "securityGroupId": "d9259c8c-ef25-425c-bb88-42e5579bb42b"},
    {"roleDefinitionId": "74ef975b-6605-40af-a5d2-b9539d836353", "roleDefinitionName": "Kaizala Administrator", "securityGroupId": "f0b1db82-158d-43ac-84c7-ca33df6d6bd7"},
    {"roleDefinitionId": "eb1f4a8d-243a-41f0-9fbd-c7cdf6c5ef7c", "roleDefinitionName": "Insights Administrator", "securityGroupId": "7905491b-08c9-45b3-aac5-65c54a845bf5"},
    {"roleDefinitionId": "31e939ad-9672-4796-9c2e-873181342d2d", "roleDefinitionName": "Insights Business Leader", "securityGroupId": "38f0bb33-654d-415c-a77f-47dd50440a9b"},
    {"roleDefinitionId": "d37c8bed-0711-4417-ba38-b4abe66ce4c2", "roleDefinitionName": "Network Administrator", "securityGroupId": "1f8f7b8f-fda4-4a1b-ad85-f45f4f2e637c"},
    {"roleDefinitionId": "2b745bdf-0803-4d80-aa65-822c4493daac", "roleDefinitionName": "Office Apps Administrator", "securityGroupId": "0de678ec-7b80-4fdd-ba25-118f5f706d26"},
    {"roleDefinitionId": "11648597-926c-4cf3-9c36-bcebb0ba8dcc", "roleDefinitionName": "Power Platform Administrator", "securityGroupId": "2f968b46-379f-4266-a39e-ebbd21f9668e"},
    {"roleDefinitionId": "0964bb5e-9bdb-4d7b-ac29-58e794862a40", "roleDefinitionName": "Search Administrator", "securityGroupId": "022f2eb8-ec31-431b-b29a-f58737130a65"},
    {"roleDefinitionId": "8835291a-918c-4fd7-a9ce-faa49f0cf7d9", "roleDefinitionName": "Search Editor", "securityGroupId": "eefc46b4-8ace-479b-93a3-a0d347dc81d5"},
    {"roleDefinitionId": "f28a1f50-f6e7-4571-818b-6a12f2af6b6c", "roleDefinitionName": "SharePoint Administrator", "securityGroupId": "8003404d-212d-4751-a97c-8ef85134d0f6"},
    {"roleDefinitionId": "e3973bdf-4987-49ae-837a-ba8e231c7286", "roleDefinitionName": "Azure DevOps Administrator", "securityGroupId": "359665f5-1d12-489f-859b-a42d002cc827"},
    {"roleDefinitionId": "6e591065-9bad-43ed-90f3-e9424366d2f0", "roleDefinitionName": "External ID User Flow Administrator", "securityGroupId": "c2ff523e-dde0-4447-82ab-ee4be0c91e03"},
    {"roleDefinitionId": "0f971eea-41eb-4569-a71e-57bb8a3eff1e", "roleDefinitionName": "External ID User Flow Attribute Administrator", "securityGroupId": "f3b74f97-48b9-4c2d-ad83-78016217dfae"},
    {"roleDefinitionId": "3a2c62db-5318-420d-8d74-23affee5d9d5", "roleDefinitionName": "Intune Administrator", "securityGroupId": "5e444c9e-b5d3-4073-a4d3-3f07d9a32207"},
    {"roleDefinitionId": "7698a772-787b-4ac8-901f-60d6b08affd2", "roleDefinitionName": "Cloud Device Administrator", "securityGroupId": "3380cea9-3f1c-478a-827c-4eb6c3488103"},
    {"roleDefinitionId": "38a96431-2bdf-4b4c-8b6e-5d3d8abac1a4", "roleDefinitionName": "Desktop Analytics Administrator", "securityGroupId": "8dc09487-053d-4df7-8c92-b7f460d855ef"},
    {"roleDefinitionId": "644ef478-e28f-4e28-b9dc-3fdde9aa0b1f", "roleDefinitionName": "Printer Administrator", "securityGroupId": "32947c1f-2b99-494c-92f9-0d0de5fc32cc"},
    {"roleDefinitionId": "e8cef6f1-e4bd-4ea8-bc07-4b8d950f4477", "roleDefinitionName": "Printer Technician", "securityGroupId": "5bd5b6df-b773-4677-b67d-9ae5bdfe48b8"},
    {"roleDefinitionId": "9f06204d-73c1-4d4c-880a-6edb90606fd8", "roleDefinitionName": "Microsoft Entra Joined Device Local Administrator", "securityGroupId": "10bbc25d-0f9a-4394-a138-f8a8f629e790"},
    {"roleDefinitionId": "11451d60-acb2-45eb-a7d6-43d0f0125c13", "roleDefinitionName": "Windows 365 Administrator", "securityGroupId": "72b0d851-4287-4500-bd4f-463919afd8de"},
    {"roleDefinitionId": "c4e39bd9-1100-46d3-8c65-fb160da0071f", "roleDefinitionName": "Authentication Administrator", "securityGroupId": "00f5bd24-045a-4c2f-95bb-f5f5bc6b2728"},
    {"roleDefinitionId": "b1be1c3e-b65d-4f19-8427-f6fa0d97feb9", "roleDefinitionName": "Conditional Access Administrator", "securityGroupId": "5579f403-10bb-4c40-87eb-6a730c771f7c"},
    {"roleDefinitionId": "729827e3-9c14-49f7-bb1b-9608f156bbb8", "roleDefinitionName": "Helpdesk Administrator", "securityGroupId": "89a3d254-53a8-4975-9e74-96a235079fb1"},
    {"roleDefinitionId": "4d6ac14f-3453-41d0-bef9-a3e0c569773a", "roleDefinitionName": "License Administrator", "securityGroupId": "dd03b133-4403-4eaf-89ac-c01142011852"},
    {"roleDefinitionId": "966707d0-3269-4727-9be2-8c3a10f19b9d", "roleDefinitionName": "Password Administrator", "securityGroupId": "a99a3b68-4181-463d-8146-96afc913b182"},
    {"roleDefinitionId": "7be44c8a-adaf-4e2a-84d6-ab2649e08a13", "roleDefinitionName": "Privileged Authentication Administrator", "securityGroupId": "9ae389cd-18e9-4aa8-a713-87a1a8b8caf4"},
    {"roleDefinitionId": "e8611ab8-c189-46e8-94e1-60213ab1f814", "roleDefinitionName": "Privileged Role Administrator", "securityGroupId": "fd2683e5-9bc1-4c84-a76d-6968b593f5d1"},
    {"roleDefinitionId": "fe930be7-5e62-47db-91af-98c3a49a38b1", "roleDefinitionName": "User Administrator", "securityGroupId": "60c42b5d-c573-43d9-90e1-65d2ae532e9d"},
    {"roleDefinitionId": "9b895d92-2cd3-44c7-9d02-a6ac2d5ea5c3", "roleDefinitionName": "Application Administrator", "securityGroupId": "271249ad-0539-4a1e-aeb2-e6027017a1cc"},
    {"roleDefinitionId": "cf1c38e5-3621-4004-a7cb-879624dced7c", "roleDefinitionName": "Application Developer", "securityGroupId": "086a2fb7-af98-46f1-810d-cc28294f6606"},
    {"roleDefinitionId": "158c047a-c907-4556-b7ef-446551a6b5f7", "roleDefinitionName": "Cloud Application Administrator", "securityGroupId": "eeb89a40-7c1c-41dc-8188-f25dc900e00e"},
    {"roleDefinitionId": "be2f45a1-457d-42af-a067-6ec1fa63bc45", "roleDefinitionName": "External Identity Provider Administrator", "securityGroupId": "60cea466-0561-4d40-8b41-84a72f616507"},
    {"roleDefinitionId": "95e79109-95c0-4d8e-aee3-d01accf2d47b", "roleDefinitionName": "Guest Inviter", "securityGroupId": "14643147-bdc9-42e6-9cb5-f925adb0d681"},
    {"roleDefinitionId": "8ac3fc64-6eca-42ea-9e69-59f4c7b60eb2", "roleDefinitionName": "Hybrid Identity Administrator", "securityGroupId": "7578923e-9505-45af-be9f-64cc1e729a2d"},
    {"roleDefinitionId": "aaf43236-0c0d-4d5f-883a-6955382ac081", "roleDefinitionName": "B2C IEF Keyset Administrator", "securityGroupId": "3f35b2c2-ba2d-4c55-b501-b81425d57be3"},
    {"roleDefinitionId": "3edaf663-341e-4475-9f94-5c398ef6c070", "roleDefinitionName": "B2C IEF Policy Administrator", "securityGroupId": "4ab1313e-74a2-4f84-b280-bc8e11fb8ac0"},
    {"roleDefinitionId": "b0f54661-2d74-4c50-afa3-1ec803f12efe", "roleDefinitionName": "Billing Administrator", "securityGroupId": "159f68fb-a72a-4db9-9de2-e2fb50af9227"},
    {"roleDefinitionId": "f023fd81-a637-4b56-95fd-791ac0226033", "roleDefinitionName": "Service Support Administrator", "securityGroupId": "6c2f178d-f17d-4928-a9f7-e29ef61ef497"},
    {"roleDefinitionId": "d29b2b05-8046-44ba-8758-1e26182fcf32", "roleDefinitionName": "Directory Synchronization Accounts", "securityGroupId": "4b7b5018-7cd3-426a-b2d7-11de9e0c7926"},
    {"roleDefinitionId": "9360feb5-f418-4baa-8175-e2a00bac4301", "roleDefinitionName": "Directory Writers", "securityGroupId": "3dbaf2fd-0a6c-4a6c-b8b5-490c9b0e0ac6"},
    {"roleDefinitionId": "8329153b-31d0-4727-b945-745eb3bc5f31", "roleDefinitionName": "Domain Name Administrator", "securityGroupId": "84b93e04-9601-46a3-bebe-d20c024391ac"},
    {"roleDefinitionId": "88d8e3e3-8f55-4a1e-953a-9b9898b8876b", "roleDefinitionName": "Directory Readers", "securityGroupId": "bb85b4c9-646c-4327-8827-189bb8ccfc99"},
    {"roleDefinitionId": "5d6b6bb7-de71-4623-b4af-96380a352509", "roleDefinitionName": "Security Reader", "securityGroupId": "0d8d76e5-3330-46a5-962a-020cbe08152e"},
    {"roleDefinitionId": "f2ef992c-3afb-46b9-b7cf-a126ee74c451", "roleDefinitionName": "Global Reader", "securityGroupId": "a788b8d9-150a-4153-b90e-8aa9d3af1704"},
    {"roleDefinitionId": "ac16e43d-7b2d-40e0-ac05-243ff356ab5b", "roleDefinitionName": "Message Center Privacy Reader", "securityGroupId": "75f9cfd7-68f4-4d71-adcf-9ada1a608fb6"},
    {"roleDefinitionId": "790c1fb9-7f7d-4f88-86a1-ef1f95c05c1b", "roleDefinitionName": "Message Center Reader", "securityGroupId": "0cd36a31-e873-4365-a0ad-96044f022668"},
    {"roleDefinitionId": "4a5d8f65-41da-4de4-8968-e035b65339cf", "roleDefinitionName": "Reports Reader", "securityGroupId": "87ac728c-b900-414b-8f43-3aaa1bef3b8c"},
    {"roleDefinitionId": "75934031-6c7e-415a-99d7-48dbd49e875e", "roleDefinitionName": "Usage Summary Reports Reader", "securityGroupId": "bbb675ee-13e0-4736-84cd-fde1a5f7e93b"},
    {"roleDefinitionId": "17315797-102d-40b4-93e0-432062caca18", "roleDefinitionName": "Compliance Administrator", "securityGroupId": "ddfef48b-1353-4e47-adf5-44a5fa8f3f8b"},
    {"roleDefinitionId": "e6d1a23a-da11-4be4-9570-befc86d067a7", "roleDefinitionName": "Compliance Data Administrator", "securityGroupId": "283e3109-9017-4d1c-9ba7-5571da6762be"},
    {"roleDefinitionId": "194ae4cb-b126-40b2-bd5b-6091b380977d", "roleDefinitionName": "Security Administrator", "securityGroupId": "d9cb810e-c35f-4192-bdba-1a33388feeb3"},
    {"roleDefinitionId": "5f2222b1-57c3-48ba-8ad5-d4759f1fde6f", "roleDefinitionName": "Security Operator", "securityGroupId": "dcfe8ebc-6de1-4f4d-bd84-47b934a109e3"},
    {"roleDefinitionId": "7495fdc4-34c4-4d15-a289-98788ce399fd", "roleDefinitionName": "Azure Information Protection Administrator", "securityGroupId": "405181d5-5710-4fba-9693-e01e732fdec8"},
    {"roleDefinitionId": "5c4f9dcd-47dc-4cf7-8c9a-9e4207cbfc91", "roleDefinitionName": "Customer LockBox Access Approver", "securityGroupId": "6ae1488b-48a7-4b50-b2c6-02963bb8b3df"},
    {"roleDefinitionId": "0526716b-113d-4c15-b2c8-68e3c22b9f80", "roleDefinitionName": "Authentication Policy Administrator", "securityGroupId": "f77ab07e-bbf5-4873-a3d1-3f4d7ee80d86"},
    {"roleDefinitionId": "9c6df0f2-1e7c-4dc3-b195-66dfbd24aa8f", "roleDefinitionName": "Attack Payload Author", "securityGroupId": "4c2cbea3-4dee-4d92-9b9b-79c904751417"},
    {"roleDefinitionId": "c430b396-e693-46cc-96f3-db01bf8bb62a", "roleDefinitionName": "Attack Simulation Administrator", "securityGroupId": "75253491-a552-4f69-b60f-f49099dcc140"}
]
'@


<#
{"roleDefinitionId": "62e90394-69f5-4237-9190-012177145e10", "roleDefinitionName": "Global Administrator", "securityGroupId": ""},

#>