sempy_labs.graph package

Module contents

sempy_labs.graph.add_group_members(group: str | UUID, user: str | UUID | List[str | UUID])

Adds a member to a group.

This is a wrapper function for the following API: Add members.

Service Principal Authentication is required (see here for examples).

Parameters:
sempy_labs.graph.add_group_owners(group: str | UUID, user: str | UUID | List[str | UUID])

Adds an owner to a group.

This is a wrapper function for the following API: Add owners.

Service Principal Authentication is required (see here for examples).

Parameters:
sempy_labs.graph.get_user(user: str | UUID) DataFrame

Shows properties of a given user.

This is a wrapper function for the following API: Get a user.

Service Principal Authentication is required (see here for examples).

Parameters:

user (str | uuid.UUID) – The user ID or user principal name.

Returns:

A pandas dataframe showing properties of a given user.

Return type:

pandas.DataFrame

sempy_labs.graph.list_group_members(group: str | UUID) DataFrame

Shows a list of the members of a group.

This is a wrapper function for the following API: List group members.

Service Principal Authentication is required (see here for examples).

Parameters:

group (str | uuid.UUID) – The group name or ID.

Returns:

A pandas dataframe showing a list of the members of a group.

Return type:

pandas.DataFrame

sempy_labs.graph.list_group_owners(group: str | UUID) DataFrame

Shows a list of the owners of a group.

This is a wrapper function for the following API: List group owners.

Service Principal Authentication is required (see here for examples).

Parameters:

group (str | uuid.UUID) – The group name or ID.

Returns:

A pandas dataframe showing a list of the owners of a group.

Return type:

pandas.DataFrame

sempy_labs.graph.list_groups() DataFrame

Shows a list of groups and their properties.

This is a wrapper function for the following API: List groups.

Service Principal Authentication is required (see here for examples).

Returns:

A pandas dataframe showing a list of groups and their properties.

Return type:

pandas.DataFrame

sempy_labs.graph.list_teams() DataFrame

Shows a list of teams and their properties.

This is a wrapper function for the following API: List teams.

Service Principal Authentication is required (see here for examples).

Returns:

A pandas dataframe showing a list of teams and their properties.

Return type:

pandas.DataFrame

sempy_labs.graph.list_users() DataFrame

Shows a list of users and their properties.

This is a wrapper function for the following API: List users.

Service Principal Authentication is required (see here for examples).

Returns:

A pandas dataframe showing a list of users and their properties.

Return type:

pandas.DataFrame

sempy_labs.graph.renew_group(group: str | UUID)

Renews the group.

This is a wrapper function for the following API: Renew group.

Service Principal Authentication is required (see here for examples).

Parameters:

group (str | uuid.UUID) – The group name or ID.

sempy_labs.graph.resolve_group_id(group: str | UUID) UUID

Resolves the group ID from the group name or ID.

Service Principal Authentication is required (see here for examples).

Parameters:

group (str | uuid.UUID) – The group name or ID.

Returns:

The group ID.

Return type:

uuid.UUID

sempy_labs.graph.resolve_user_id(user: str | UUID) UUID

Resolves the user ID from the user principal name or ID.

Service Principal Authentication is required (see here for examples).

Parameters:

user (str | uuid.UUID) – The user ID or user principal name.

Returns:

The user ID.

Return type:

uuid.UUID

sempy_labs.graph.send_mail(user: UUID | str, subject: str, to_recipients: str | List[str], content: str, content_type: Literal['Text', 'HTML'] = 'Text', cc_recipients: str | List[str] | None = None, bcc_recipients: str | List[str] | None = None, priority: Literal['Normal', 'High', 'Low'] = 'Normal', attachments: str | List[str] | None = None)

Sends an email to the specified recipients.

This is a wrapper function for the following API: user: sendMail.

Service Principal Authentication is required (see here for examples).

Parameters:
  • user (uuid.UUID | str) – The user ID or user principal name.

  • subject (str) – The email subject.

  • to_recipients (str | List[str]) – The email address of the recipients.

  • content (str) – The email content.

  • content_type (Literal["Text", "HTML"], default="Text") – The email content type. Options: “Text” or “HTML”.

  • cc_recipients (str | List[str], default=None) – The email address of the CC recipients.

  • bcc_recipients (str | List[str], default=None) – The email address of the BCC recipients.

  • priority (Literal["Normal", "High", "Low"], default="Normal") – The email priority.

  • attachments (str | List[str], default=None) – The abfss path or a list of the abfss paths of the attachments to include in the email.