action.skip

Managing Users with the API

This topic provides an overview of managing user accounts using the Megaport API. It describes how to invite new users, update user details, deactivate users, and delete invited users.

Note

If your organization uses an Identity Provider (IdP), Megaport recommends setting up Single Sign-On (SSO) with Security Assertion Markup Language (SAML) to centrally manage users.

SSO offers these advantages:

  • Automatic user management – Disabling a user in your IdP automatically revokes their Megaport access.
  • Reduced manual work – No need to manually deactivate users through the API.

For more information, see Setting up Single Sign-On.

The following procedures are intended for environments where SSO integration is not in use.

Invite new users

A Company Admin user can create new user accounts by inviting users to an existing company using the /v2/employment endpoint.

For more information, see Invite (Add) a New User to an Existing Company.

View user details

You can view the details of a specific user, such as position, name, email address, phone number, username, whether the user is active or not, Megaport user role, Megaport permissions, and whether multi-factor authentication (MFA) is enabled for the user, using the v2/employee/:employeeId endpoint.

For more information, see Show User Details.

Update user details

You can update user details, such as name, phone number, and roles using the /v2/employee/:employeeId endpoint.

Additionally, you can deactivate users by setting the active attribute to false.

Note

  • You cannot permanently delete users who have once logged in. Instead, you must deactivate them to revoke their access while retaining their information in the system.
  • Only invited users who have not yet accepted the invitation can be deleted.

For more information, see Update User Details.

Delete invited users

You can delete users who have been invited to your company but have not yet logged in by using the /v2/employee/:employeeId endpoint. This is useful if the wrong user was invited or there was an error in the email address provided. Since the email address of a user cannot be modified once created, you can delete the user and then recreate the account with the correct details.

Note

  • You cannot permanently delete users who have logged in. Instead, you must deactivate them to revoke their access while retaining their information in the system. To deactivate a user, set the active attribute to false using the /v2/employee/:employeeId endpoint.
  • Only invited users who have not yet accepted the invitation can be deleted.

For more information, see Delete Invited User.

List all company users

You can create a list of all users associated with your company, including their details and statuses, using the /v2/employment endpoint.

For more information, see List Company Users.

View user activity

Access logs and activity details to track user actions in the Portal. This feature helps monitor and audit user behavior.

For more information, see User Activity.

Reset Multi-Factor Authentication (MFA)

If a user encounters issues with MFA or wants to enroll a new mobile device, you can reset MFA using the /v2/employee/:employeeId/mfa endpoint.

For more information, see Reset Person Multi-Factor Authentication.

Disable Multi-Factor Authentication (MFA)

You can disable MFA for a user when MFA is set to optional globally for your company, and the user is currently using MFA to log in using the /v2/employee/:employeeId/mfa endpoint.

For more information, see Disable Person Multi-Factor Authentication.