GithubHelp home page GithubHelp logo

isabella232 / communication-services-authentication-hero-nodejs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/communication-services-authentication-hero-nodejs

0.0 0.0 0.0 6.49 MB

Hero sample to showcase authentication capabilities for Azure Communication Services

License: MIT License

JavaScript 15.16% TypeScript 65.88% Shell 0.02% HTML 1.17% CSS 0.69% PowerShell 17.09%

communication-services-authentication-hero-nodejs's Introduction

page_type languages products
sample
javascript
nodejs
azure
azure-communication-services

Deploy to Azure using instructions here.

Azure Communication Services Solutions - Authentication Server Sample

CI CodeQL TypeScript Node.js License: MIT

  1. Overview
  2. Prerequisites
  3. Getting Started
  4. Endpoints
  5. Troubleshooting
  6. Need Help
  7. Contributing
  8. Resources
  9. Trademark
  10. License

Overview

In order to properly implement a secure Azure Communication Services solutions, developers must start by putting in place the correct infrastructure to properly generate user and access token credentials for Azure Communication Services. Azure Communication Services is identity-agnostic, to learn more check out our conceptual documentation.

This repository provides a sample of a server implementation of an authentication service for Azure Communication Services. It uses best practices to build a trusted backend service that issues Azure Communication Services credentials and maps them to Azure Active Directory identities.

This sample can help you in the following scenarios:

  1. As a developer, you need to enable an authentication flow for joining native Azure Communication Services and/or Teams Interop calling/chat which is done by mapping an Azure Communication Services identity to an Azure Active Directory identity and using this same Azure Communication Services identity for the user to fetch an Azure Communication Services token in every session.
  2. As a developer, you need to enable an authentication flow for Custom Teams Endpoint which is done by using an M365 Azure Active Directory identity of a Teams' user to fetch an Azure Communication Services token to be able to join Teams calling/chat.

If you are looking to get started with Azure Communication Services, but are still in learning / prototyping phases, check out our quickstarts for getting started with azure communication services users and access tokens.

📢 An Azure Communication Services Solutions - Authentication Sample (C# version) can be found here.

Azure Communication Services Authentication Server Sample Overview Flow

Additional documentation for this sample can be found on Microsoft Docs.

Since this sample only focuses on the server APIs, the client application is not part of it. If you want to add the client application to login user using Azure Active Directory, then please follow the MSAL samples here.

Before contributing to this sample, please read our contribution guidelines.

Prerequisites

To be able to run this sample, you will need to:

Getting Started

If you're wondering where to get started, here are a few scenarios to help you get going:

Endpoints

This Azure Communication Services Solutions - Authentication server sample provides responses for user and token endpoints. For more details, please check our Endpoints and Responses designe doc.

Troubleshooting

  1. Maximum number of extensions values supported per application is 2.

    An application can add at most two open extensions for an Azure Active Directory user.

    Resolution: If more than 2 extensions are required, then Graph Open Extensions cannot be used to persist the Azure Communication Services Identity mapping as in the sample. You need to consider Alternative Identity Mapping as suggested in Architecture Overview. Otherwise, you can delete the extensions following Graph Open Extensions Delete API. You can delete the extension for any user, if you are M365 Tenant/Azure Active Directory Admin. You can use Graph Explorer to execute for a single user.

  2. Provided identity doesn't belong to the resource.

    This issue happens if there is mismatch of Azure Communication Services Identity persisted within Graph Open Extensions user instance and the Azure Communication Services resource.

    The scenario would happen when the Azure Communication Service Identity mapping for a Azure Active Directory user account was created with one Azure Communication Services resource in the deployed sample and the Azure Communication Services resource changed with subsequent deployments.

    Resolution: Swap the Azure Communication Services resource used in the deployed sample as was used in prior deployment. Otherwise delete the extension within Graph Open extensions using the resolution step for above issue.

  3. For troubleshooting Azure Active Directory Token issues, please refer to Troubleshoot AAD Token.

  4. For troubleshooting consent issues during Azure Active Directory authentication flow, please refer to Unexpected user consent error, Unexpected user consent prompt.

Application Troubleshooting

  1. When running sample application in local, to troubleshoot unexpected error response on APIs, you could use stacktrace present in the response.

  2. When running the sample application in production e.g. Azure App Service, you can enable Application Insights to troubleshoot the Api failures in absence of application logs.

    (i) You can refer to Enable Application Insights on App Service for enabling Application Insights on web application deployed on App Service.

    (ii) You can refer to Analyze Failures on how to troubleshoot unexpected Api response.

Need Help

If you are are unable to find solution to the issue you are facing while running the sample on local or on production, you can use Discussions Channel to seek advise.

Contributing

Join us by making a contribution. To get you started check out our contribution guidelines.

We look forward to building an amazing open source Azure Communication Services Authentication server sample with you!

Resources

Trademark

Trademarks This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.

License

MIT

communication-services-authentication-hero-nodejs's People

Contributors

alcail avatar clarenceli-msft avatar dependabot[bot] avatar ikumarapeli-msft avatar lei-msft avatar microsoft-github-operations[bot] avatar microsoftopensource avatar rvenugopal-msft avatar

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.