Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get team member according to name or upn or email #38287

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,10 @@ def get_team_member_id(requested_team_member: str, integration_context: dict) ->
for team in teams:
team_members: list = team.get('team_members', [])
for team_member in team_members:
if requested_team_member in {team_member.get('name', ''), team_member.get('userPrincipalName', '').lower()}:
return team_member.get('id')
member_properties = [team_member.get('email', '').lower(), team_member.get(
'userPrincipalName', '').lower(), team_member.get('name', '').lower()]
if requested_team_member.lower() in [value.lower() for value in member_properties]:
return team_member.get("id")

raise ValueError(f'Team member {requested_team_member} was not found')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ configuration:
hidden: true
required: false
- display: Authentication Type
additionalinfo: |-
additionalinfo: |-
When switching from the 'Client Credentials Flow' to the 'Authorization Code Flow' do as follow: Save the instance, run the 'microsoft-teams-generate-login-url' command and follow the instructions mentioned there. Once done, test the validity of your instance by running the 'microsoft-teams-auth-test' command.
When switching from the 'Authorization Code Flow' to the 'Client Credentials Flow', test the validity of the instance by clicking the 'Test' button.
name: auth_type
Expand Down Expand Up @@ -135,6 +135,7 @@ configuration:
name: new_incident_welcome_message
required: false
type: 0
section: Connect
- display: Long running instance
name: longRunning
type: 8
Expand Down Expand Up @@ -721,22 +722,22 @@ script:
arguments: []
- description: |-
Retrieves the API permissions associated with the used graph access token.

Note: Use this command if you encounter insufficient permissions error when attempting to execute an integration command.
Compare the permissions list obtained for the token with the permissions required for the desired command (can be found in the integration documentation). If there are missing API permissions, add them to your application, and then run the `microsoft-teams-auth-reset` command (as described here - https://xsoar.pan.dev/docs/reference/integrations/microsoft-teams#microsoft-teams-auth-reset).
name: microsoft-teams-token-permissions-list
arguments: []
- description: |-
Generates the messaging endpoint, based on the server URL, the server version, and the instance configurations.

Note: The messaging endpoint should be added to the Demisto bot configuration in Microsoft Teams as part of the prerequisites of the integration's setup. For more information, see - https://xsoar.pan.dev/docs/reference/integrations/microsoft-teams#create-the-demisto-bot-in-microsoft-teams.
name: microsoft-teams-create-messaging-endpoint
arguments:
- description: |-
If your instance configuration involves a Cortex XSOAR engine, provide the engine's IP (or DNS name) and the port in use in the following format - `https://IP:port` or `http://IP:port`.
For example - `https://my-engine.name:443`, `http://1.1.1.1:443`.
name: engine_url
dockerimage: demisto/teams:1.0.0.116912
- description: |-
If your instance configuration involves a Cortex XSOAR engine, provide the engine's IP (or DNS name) and the port in use in the following format - `https://IP:port` or `http://IP:port`.
For example - `https://my-engine.name:443`, `http://1.1.1.1:443`.
name: engine_url
dockerimage: demisto/teams:1.0.0.1860894
longRunning: true
longRunningPort: true
script: ''
Expand Down
7 changes: 7 additions & 0 deletions Packs/MicrosoftTeams/ReleaseNotes/1_5_12.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

#### Integrations

##### Microsoft Teams
- Updated the Docker image to: *demisto/teams:1.0.0.1860894*.

- Improved implementation of the ***send-notification*** command.
2 changes: 1 addition & 1 deletion Packs/MicrosoftTeams/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Microsoft Teams",
"description": "Send messages and notifications to your team members.",
"support": "xsoar",
"currentVersion": "1.5.11",
"currentVersion": "1.5.12",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
Loading