You can manage those via the B2BManagementPolicy policy under https://graph.microsoft.com/beta/legacy/policies
Going forward, you should be using the cross-tenant collaboration policies instead.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi All,
I am trying to Add and delete domains via "Microsoft Grap" at Entra Id > External Identities > External collaboration settings.
Does anyone know how to add and remove domains using Microsoft Graph when I select "Allow invitations only to the specified domains (most restrictive)" or "Deny invitations to the specified domains"?
Thanks
Leonardo
You can manage those via the B2BManagementPolicy policy under https://graph.microsoft.com/beta/legacy/policies
Going forward, you should be using the cross-tenant collaboration policies instead.
Thanks for your answer, now I can view my policy, but when I try to PATCH it I get this response. I tried to configure my application permissions to allow "Policy.ReadWrite.All" but I did not found.
{
"error": {
"code": "Authorization_RequestDenied",
"message": "Insufficient privileges to complete the operation.",
"innerError": {
"date": "2024-09-03T14:55:09",
"request-id": "c872259d-0f79-425e-a082-cd5edaec304b",
"client-request-id": "c872259d-0f79-425e-a082-cd5edaec304b"
}
}
}
This is my curl
curl --location --request PATCH 'https://graph.microsoft.com/beta/legacy/policies/14928e78-a165-40f1-99bc-003187122345' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJub25jZSI6Inh2eGcxQ25sN2xPc1N........................' \
--data '{
"definition": [
"{\"InvitationsAllowedAndBlockedDomainsPolicy\":{ \"AllowedDomains\":[\"example.com\",\"newdomain.com\",\"anotherdomain.org\"] }}"
]
}'
These are my Bearer Token Roles
"roles": [ "User.ReadWrite.All", "Policy.ReadWrite.ConditionalAccess", "Directory.ReadWrite.All", "AuditLog.Read.All", "Policy.Read.All" ],