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)