Share via

Invitations are blocked for this directory due to suspicious activity. Please contact Microsoft support for help.

Thomas Gallaway 25 Reputation points
2025-10-24T16:46:56.8033333+00:00

Hi microsoft Q&A.

So while importing 281 external business users we ended up getting blocked. I created a Microsoft support ticket but they won't be able to help us until possibly monday. But we are launching this saas application on Friday night. we only are missing 46 existing customers but we want to ensure that every user is available.

We are migrating the users from OKTA via css export and I wrote a python / msgraph script that I assigned an enterprise application with the approrpirate API permissions to invite the users (without sending them a invitation email, as we will send it separately once we changed the directory from okra to Entra).

2025-10-23 21:13:47,790 - INFO - Processing user 239/285: ********@********.com
2025-10-23 21:13:47,790 - INFO - ClientSecretCredential.get_token succeeded
2025-10-23 21:13:51,152 - INFO - HTTP Request: POST https://graph.microsoft.com/v1.0//invitations "HTTP/2 201 Created"
2025-10-23 21:13:51,164 - INFO - Successfully invited user: ********@********..com (ID: **********-****-****-****-**********)
2025-10-23 21:13:51,165 - INFO - Processing user 240/285: ****@****.com
2025-10-23 21:13:51,165 - INFO - ClientSecretCredential.get_token succeeded
2025-10-23 21:13:53,365 - INFO - HTTP Request: POST https://graph.microsoft.com/v1.0//invitations "HTTP/2 403 Forbidden"
2025-10-23 21:13:53,381 - ERROR - Failed to invite user ****@****.com: 
        APIError
        Code: 403
        message: None
        message: None
        error: MainError(additional_data={}, code='Forbidden', details=None, inner_error=InnerError(additional_data={}, client_request_id='941f787c-****-****-****-982cbcc6815b', date=datetime.datetime(2025, 10, 24, 4, 13, 53), odata_type=None, request_id='b2a11418-****-****-****-8484bd08224a'), message='Invitations are blocked for this directory due to suspicious activity. Please contact Microsoft support for help.', target=None)
Microsoft Security | Microsoft Entra | Microsoft Entra External ID

Answer accepted by question author
  1. Sridevi Machavarapu 26,355 Reputation points Microsoft External Staff Moderator
    2025-10-27T06:22:14.43+00:00

    Hello Thomas Gallaway,

    Based on the error message you received it appears that was Invitations are blocked in your tenant due to suspicious activity.

    We addressed this by collaborating with our internal team, who have now unblocked your tenant.

    You can check and confirm whether you were able to access the tenant which was blocked.

    Hope this helps. Let us know if you have any queries. Happy to assist you further.


0 additional answers

Sort by: Most helpful

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.