Collaboration restrictions at External Identities | External collaboration settings

Leonardo A. Barbastefano 21 Reputation points
2024-08-13T09:00:23.9833333+00:00

Hi All,

screencapture-entra-microsoft-2024-08-13-09_48_47

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

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

Answer accepted by question author
  1. Vasil Michev 123.5K Reputation points MVP Volunteer Moderator
    2024-08-13T17:33:20.38+00:00

    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.


1 additional answer

Sort by: Most helpful
  1. Leonardo A. Barbastefano 21 Reputation points
    2024-09-03T15:01:24.97+00:00

    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" ],

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.