Coder Social home page Coder Social logo

mattermost-plugin-skype4business's Introduction

Disclaimer

This repository is community supported and not maintained by Mattermost. Mattermost disclaims liability for integrations, including Third Party Integrations and Mattermost Integrations. Integrations may be modified or discontinued at any time.

Mattermost Skype for Business Plugin (Beta)

Build Status Code Coverage

Maintainer: @kosgrz Co-Maintainer: @mickmister

Start and join voice calls, video calls and use screen sharing with your team members with a Skype for Business plugin for Mattermost.

Clicking a video icon in a Mattermost channel posts a message that invites team members to join a Skype for Business meetings call.

Originally developed by kosgrz.

image

Installation

Skype for Business Online

  1. Install the plugin
    1. Download the latest version of the plugin from the GitHub releases page
    2. In Mattermost, go to System Console -> Plugins -> Management
    3. Upload the plugin
  2. Register an Azure Active Directory app
    1. Sign in to https://portal.azure.com/#home
    2. On the left-hand sidebar, select Azure Active Directory, then navigate to App registrations -> New application registration
    3. Set the following values:
      • Name: Mattermost Skype for Business Plugin - [your company name]
      • Supoorted account types: Accounts in any organizational directory and personal Microsoft accounts (e.g. Skype, Xbox, Outlook.com)
      • Redirect URI (optional): Web, then enter "https://your-mattermost-url.com/plugins/skype4business/api/v1/auth_redirect" replacing https://your-mattermost-url.com with your Mattermost URL
    4. Click Register to submit
  3. Grant permissions for your application in Azure Active Directory
    1. Select API permissions in the application sidebar menu, then Add a permision -> Skype for Business -> Delegated permissions
    2. Click the Meetings dropdown, then check Meetings.ReadWrite.
    3. Click Add permissions to submit
    4. Click Grant admin consent for ..., then Yes to confirm
  4. Allow implicit flow in Azure Active Directory
    1. Select Manifest in the application sidebar menu
    2. Set the oauth2AllowImplicitFlow and oauth2AllowIdTokenImplicitFlow values to true
    3. Click Save
  5. Configure the plugin in Mattermost
    1. Select Overview in the application sidebar menu
    2. Copy the Application (client) ID value
    3. In Mattermost, go to System Console -> Plugins -> Skype for Business, and enter the Application ID you copied on the previous step
    4. Choose Online as the Skype for Business Product Type.
    5. Click Save
  6. Enable the plugin
    1. Go to System Console -> Plugins -> Management and click Enable underneath the Skype for Business plugin
  7. Try it out
    1. Go to a Mattermost channel and click the Skype for Business icon in the channel header
    2. A dialog will open asking you to sign in to microsoftonline.com
    3. Once signed in, the dialog will close and a new message posted to the channel, with a link to the newly created meeting
    4. By clicking the "Join meeting" button, you will be redirected to a meet. page, which in turn opens a Skype for Business client installed on your computer or smartphone to join the meeting

Skype for Business Server

  1. Install the plugin
    1. Download the latest version of the plugin from the GitHub releases page
    2. In Mattermost, go to System Console -> Plugins -> Management
    3. Upload the plugin
  2. Configure the plugin
    1. Go to System Console -> Plugins -> Skype for Business
    2. Choose Server as the Skype for Business Product Type
    3. Enter the Server Domain of your Skype for Business server instance. For example, contoso.com.
    4. Enter the Skype for Business Bot Username of your bot user created in the Skype for Business domain. For example, [email protected]. We strongly recommend using a dedicated bot account for this plugin, rather than an existing Skype for Business user account.
    5. Enter the Skype for Business Bot Password of your bot user created in the Skype for Business domain.
    6. Click Save
  3. Enable the plugin
    1. Go to System Console -> Plugins -> Management and click Enable underneath the Skype for Business plugin
  4. Try it out
    1. Go to a Mattermost channel and click the Skype for Business icon in the channel header
    2. Observe a new message posted to the channel, with a link to the newly created meeting
    3. By clicking the "Join meeting" button, you will be redirected to a meet. page, which in turn opens a Skype for Business client installed on your computer or smartphone to join the meeting

Developing

This plugin contains both a server and web app portion.

Use make dist to build distributions of the plugin that you can upload to a Mattermost server for testing.

Use make check-style to check the style for the whole plugin.

Server

Inside the /server directory, you will find the Go files that make up the server-side of the plugin. Within there, build the plugin like you would any other Go application.

Web App

Inside the /webapp directory, you will find the JS and React files that make up the client-side of the plugin. Within there, modify files and components as necessary. Test your syntax by running npm run build.

mattermost-plugin-skype4business's People

Contributors

kosgrz avatar hanzei avatar jasonblais avatar mickmister avatar dependabot[bot] avatar bbodenmiller avatar ivenk avatar agarciamontoro avatar justinegeffen avatar toninis avatar augustasv avatar cwarnermm avatar crspeller avatar larkox avatar spirosoik avatar kshitij-katiyar avatar sibasankarnayak avatar

Stargazers

Joram Wilander avatar Kyle avatar  avatar Jascha avatar Michael Bondarevsky avatar  avatar  avatar Daniel Morgenstern avatar Thorsten Klein avatar idoxtreme avatar John Pilar avatar Kristof Daja avatar  avatar  avatar  avatar Denis Kvist avatar  avatar

Watchers

Deepak Demiwal avatar Jesús Espino avatar Adam Clarkson avatar Toshaan Bharvani avatar James Cloos avatar Maria A Nunez avatar Christopher Poile avatar Don Hogan avatar Agniva De Sarker avatar Claudio Costa avatar  avatar Stavros Foteinopoulos avatar William Gathoye avatar Gabe Jackson avatar Mir Shahriar Sabuj avatar Doug Lauder avatar Saturnino Abril avatar Murat avatar Elias Nahum avatar Steve Mudie avatar Laney avatar Abdulmalik Ibrahim avatar Corey R avatar Tanmay Singh avatar Pablo Vélez avatar Asaad Mahmood avatar Mario Vitale avatar Caleb Roseland avatar Scott Bishel avatar Nathaniel Allred avatar Ben Cooke avatar Ogi Marusic avatar  avatar na avatar Hossein avatar Maxwell Power avatar Rajat Dabade avatar  avatar  avatar  avatar  avatar

mattermost-plugin-skype4business's Issues

Feature request: Meeting name and expiration

Hi thank you for the nice plugin, it works for us now.
Maybe you even considered that already, we would find it useful if the plugin allows to give:

  • a custom name to the meeting
  • optionally schedule it for a specific time
  • give an expiration time so the people cannot use it after that

Keep up the good work!

When the meeting ends, update S4B meeting post to say so

Observed: After ending the meeting, the plugin still says the meeting was started

image

Proposed: Example from Zoom plugin below. It is okay to use a simpler version in the S4B plugin such as

<user> has ended the meeting

Skype for Business Meeting

Date: <Date> at <Time>

image

Release v0.2.0

There have been 18 commits since the last release in July 2019. In the documentation it states to use the plugin to download the source from the last release, but I think that there are probably changes we would want since then (Specifically the NPM Audit changes)

Integrate GolangCI-Lint

Mattermost is currently in the process of using golangci-lint as the default linter for all go projects. mattermost-community/mattermost-plugin-autolink#108 serves as an example of how the migration should look like:

  1. Copy .golangci.yml from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.
  2. Copy Makefile from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.
  3. Copy build/ from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.
  4. Run go mod tidy and make dist to ensure the build system works fine.
  5. Update linters-settings.goimports.local-prefixes to the go module path i.e. to github.com/mattermost/mattermost-plugin-aws-SNS.
  6. Run make golangci-lint and fix all issues that arise.

Fixing an linter issue is sometimes trivial but can also be quite complicated. There might be cases, where ignoring an issue using issues.exclude-rules is needed. If you don't know how to resolve an error, please reach out to @hanzei on the Mattermost Community Server or ask the question here.

Error extracting plugin

Hi,

I'm trying to install sfb plugin v0.1.2 into Mattermost 5.19.1 (bundled with gitlab).

I downloaded the plugin here: https://github.com/kosgrz/mattermost-plugin-skype4business/archive/v0.1.2.tar.gz

The error I'm getting is:

{"level":"error","ts":1585067578.4680972,"caller":"mlog/log.go:174","msg":"Encountered error extracting plugin","path":"/api/v4/plugins","request_id":"x7e44so53td67q3fhyuw4curxo","ip_addr":"85.212.72.83","user_id":"hesn8tm5g7f38cfhriryytibao","method":"POST","err_where":"installPluginLocally","http_code":400,"err_details":"ExtractTarGz: unknown type: 103 in pax_global_header"}

I guess I'll have to build the plugin in some way. But there's nothing mentioned in the readme...

Make code golint compliant

$ make golint
Running lint
env GO111MODULE=off /usr/bin/go get golang.org/x/lint/golint
/home/sumacheb/go/bin/golint -set_exit_status ./...
server/plugin.go:26:2: exported const PostMeetingKey should have comment (or a comment on this block) or be unexported
server/plugin.go:35:6: exported type IClient should have comment or be unexported
server/plugin.go:44:6: exported type Plugin should have comment or be unexported
server/plugin.go:57:1: exported method Plugin.OnActivate should have comment or be unexported
Found 4 lint suggestions; failing.
make: *** [Makefile:80: golint] Error 1

@yoandrygc Is this issue solved?

          @yoandrygc Is this issue solved?

Originally posted by @larkox in #52 (comment)

{
"caller": "web/context.go:117",
"err_where": "installExtractedPlugin",
"error": "installExtractedPlugin: Unable to generate plugin webapp bundle., unable to copy webapp bundle directory: jira: mkdir client/plugins/jira: permission denied",
"http_code": 500,
"ip_addr": "10.2.6.2",
"level": "error",
"method": "POST",
"msg": "Unable to generate plugin webapp bundle.",
"path": "/api/v4/plugins/marketplace",
"request_id": "moxdhjtkjfbffg4cr6mnzgrury",
"timestamp": "2023-10-04 18:13:16.738 Z",
"user_id": "368zkifiujyoigiqetkxafu36w"
}

[Feature request] support for multiple configurations

Hey there,

I really like this plugin!
In our enterprise environment, we have several different Skype instances. An option to configure multiple skype instances and make them selectable via dropdown would be really great!

Do you think this would be feasible?

Best regards!

Include CSRF token in webapp’s API requests

When a plugin’s webapp makes an API request to the Mattermost server, it needs to include the CSRF token supplied by the server in its request. This can be done using the getOptions function exported by the mattermost-redux library. Here is some example usage

https://github.com/mattermost/mattermost-plugin-jira/blob/ae5676ead0e9effca29d2948c6596f42cf6e35c1/webapp/src/client/index.js#L13-L18

The task here is to convert all API requests done by the plugin’s Client to use the token. The import statement import request from 'superagent' should be removed, and favor using fetch instead, as shown in the example usage linked above.

MM-47046 Use version of React DOM provided by web app

From here:

"For some more context, see here. The short version though is that we updated the web app to React 17, and there's a chance that plugins will have some issues with it because they're compiled with the React 16 version of ReactDOM. I'm submitting PRs to the 3 products, the demo plugin, and the plugin template to have them use the web app's version of React DOM to fix any immediate issues, but we'll want to properly migrate them to React 17 going forward."

Ticket Link
https://mattermost.atlassian.net/browse/MM-47046

Related Pull Requests
mattermost/mattermost-plugin-playbooks#1489
mattermost/focalboard#3861
mattermost-community/mattermost-plugin-todo#190
mattermost/mattermost-plugin-starter-template#169

Response doesn't have WWW-AUTHENTICATE header!

Getting the following errors when trying to run with Skype for Business Server:

{"level":"debug","ts":1587102486.5159667,"caller":"mlog/log.go:162","msg":"CSRF Check failed for request - Please migrate your plugin to either send a CSRF Header or Form Field, XMLHttpRequest is deprecated","path":"/plugins/skype4business/api/v1/create_meeting_in_server_version","ip":"127.0.0.1:48131","session_id":"..........","user_id":"..........."}
...
{"level":"info","ts":1587102491.4761477,"caller":"[email protected]/stream.go:15","msg":"{\"level\":\"warn\",\"msg\":\"Resource from applications url is not the same as resource name from user url\"}","plugin_id":"skype4business","source":"plugin_stdout"}
{"level":"info","ts":1587102491.4866028,"caller":"[email protected]/stream.go:15","msg":"{\"level\":\"error\",\"msg\":\"Error fetching meetings resource url: Error performing request to get authentication header from new resource: Response doesn't have WWW-AUTHENTICATE header!\"}","plugin_id":"skype4business","source":"plugin_stdout"}

Connect users as leaders

Now users are connected as attendances and because of that, they cannot, for example, present their desktops, etc.

There are two options in my mind to consider:

  1. The creator of a meeting could be automatically marked as a leader
  2. Everyone in the same enterprise, who joins the meeting, would be automatically marked as a leader

AutodiscoverService fails in the online version of the plugin

Cannot create a new meeting, because the AutodiscoverService fails:
Access to fetch at 'https://webdir2e.online.lync.com/Autodiscover/AutodiscoverService.svc/root/oauth/user' from origin 'https://5cf9b2c4cadf.ngrok.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled

Log requests being sent to the skype server

Troubleshooting issues with connecting to on-prem skype4business servers has consistently proven to be difficult. It would be useful to be able to view the raw requests being sent out. The task here is to log the request or important bits of the request to the server logs.

Issue created from a Mattermost message by @muratbayan.

Issue: Missing id_token

Hi All,

Thank you for the plugin. We installed the plugin and enabled in Mattermost and registered application in Azure as described. We can see the icon displayed in Mattermost but when i clicked the icon nothing is happening. But in the background i see the redirect url returning "missing id_token" response with http status code 401.

Could you please let me know what i can be missing in the configuration.

Here is my Manifest file from Azure

{
"id": "badbb555-f750-49f6-952e-281b6d4efdee",
"acceptMappedClaims": null,
"accessTokenAcceptedVersion": 2,
"addIns": [],
"allowPublicClient": null,
"appId": "bXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1",
"appRoles": [],
"oauth2AllowUrlPathMatching": false,
"createdDateTime": "2019-07-17T11:08:06Z",
"groupMembershipClaims": null,
"identifierUris": [],
"informationalUrls": {
"termsOfService": null,
"support": null,
"privacy": null,
"marketing": null
},
"keyCredentials": [],
"knownClientApplications": [],
"logoUrl": null,
"logoutUrl": null,
"name": "Mattermost Skype for Business Plugin - XXXX",
"oauth2AllowIdTokenImplicitFlow": true,
"oauth2AllowImplicitFlow": true,
"oauth2Permissions": [],
"oauth2RequirePostResponse": false,
"optionalClaims": null,
"orgRestrictions": [],
"parentalControlSettings": {
"countriesBlockedForMinors": [],
"legalAgeGroupRule": "Allow"
},
"passwordCredentials": [],
"preAuthorizedApplications": [],
"publisherDomain": "XXXXXXXX.onmicrosoft.com",
"replyUrlsWithType": [
{
"url": "https://XXXXXXXXXXX/plugins/skype4business/api/v1/auth_redirect",
"type": "Web"
}
],
"requiredResourceAccess": [
{
"resourceAppId": "00000004-0000-0ff1-ce00-000000000000",
"resourceAccess": [
{
"id": "d0c8f2ea-8f80-4289-8e78-4bc821cde1bc",
"type": "Scope"
}
]
},
{
"resourceAppId": "00000003-0000-0000-c000-000000000000",
"resourceAccess": [
{
"id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
"type": "Scope"
}
]
}
],
"samlMetadataUrl": null,
"signInUrl": null,
"signInAudience": "AzureADandPersonalMicrosoftAccount",
"tags": [],
"tokenEncryptionKeyId": null
}

Thanks,
Venkat

How to fix 'Server Domain'?

Hi, I was flailing with the Server Domain setting and stuck in a https://theedge.company.com and I can't change it. It seems since it was valid, the plugin stuck it in the kv store. Can you tell me now to clear out the settings so I can stick in the correct information?

Thanks!

Use SiteURL for all calls from the webapp

If the server's SiteURL is configured with a subpath, the webapp's API calls do not work. The task here is to make this plugin's client to prefix its URLs with the SiteURL. This also includes any calls to /plugins/*

Only API calls to the Mattermost server should use the SiteURL. Any calls to Microsoft servers should not use the SiteURL.

Here's an example of how the SiteURL may be computed:
https://github.com/mattermost/mattermost-plugin-jira/blob/19a9c2442817132b4eee5c77e259b80a40188a6a/webapp/src/selectors/index.js#L13-L26

little issue when trying to create meeting on server mode

Hi, this is a very nice integration, we would like to use,

After initial installation and configuration, we have this error:

Mattermost channel:
System
2:58 PM(Only visible to you)
×
An error occurred when creating the meeting. Please try again later.

mattermost logs:

"caller":"go-plugin/stream.go:15","msg":"invalid character '<' looking for beginning of value","plugin_id":"skype4business","source":"plugin_stdout"}

It could be that the configuration is not done right,
Thanks a lot for the nice integration.

Use S4B icon in posts created by plugin

Observed:

image

Proposed change: When a message is posted by the plugin, use the same Skype4Business icon as used elsewhere in the UI

Below is an example from the Zoom plugin

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.