Edit

Share via


Launch Dynamics 365 Remote Assist from another app (protocol activation)

Tip

Dynamics 365 Remote Assist customers now have access to Remote Assist in Microsoft Teams mobile. Learn more: Collaborate with other users and Use spatial annotations on Teams.

Note

Azure Active Directory is now Microsoft Entra ID. Learn more.

You can embed code in your HoloLens to switch to Microsoft Dynamics 365 Remote Assist and begin a call using a Uniform Resource Identifier (URI).

For example, let’s say you’re creating a helicopter maintenance app. You can add a button that a maintenance engineer can use to call an expert if they get stuck. The button launches Dynamics 365 Remote Assist and calls the designated expert.

HoloLens Protocol Activation

The Dynamics 365 Remote Assist HoloLens application supports two methods for protocol activation:

  • 'ms-voip-video' is for video-enabled calling.

  • 'ms-voip-call' is for audio-only calling.

Both methods use the same argument schema, which accepts a 'contactID' field. The URI would look something like this:

ms-voip-video:?contactids=\<contactID\>

The contact ID is the user’s Microsoft Entra object ID.

Code example

Embed the code in your HoloLens app. The following code example is written in C++, but can be easily adapted to another language.

Platform::String\^ id = objectId-\>Text;
auto uri = ref new Windows::Foundation::Uri("ms-voip-video:?contactids=" + id);
resultText-\>Text = uri-\>AbsoluteUri; 

concurrency::task\<bool\> launchUriOperation(Windows::System::Launcher::LaunchUriAsync(uri));
launchUriOperation.then([this](bool success)   
{         
    if (success)         
    {             
        // URI launched  
        resultText-\>Text += " (URI Launched)"; 
    } 
    else         
    {             
        // URI launch failed             
        resultText-\>Text += " (FAILED)";
    }     
});  

To place an audio-only call instead of video, use URI: “ms-voip-call:?contactids=”

Return to your app at the end of a call

Another returnto field can be included to have Dynamics 365 Remote Assist return to your application when a call ends. This field enables users to both start and end their experience in your app without having to manually switch between them.

To support the returnto field, you need to register your app with a custom URI (see Register an app with a custom URI).

Then include the optional returnto field along with the registered app name you completed in the previous step. In the following example, "helicoptor-maintenance-app" is the registered URI:

ms-voip-call:?contactids=<CONTACT_ID>&returnto=helicoptor-maintenance-app");

Example of launching Dynamics 365 Remote Assist from your app with optional returnto field

The following code example is written in C++, but can be easily adapted to another language.

Platform::String^ id = objectId->Text;
auto uri = ref new Windows::Foundation::Uri("ms-voip-video:?contactids=" + id + &returnto=helicoptor-maintenance-app");
resultText->Text = uri->AbsoluteUri; 

concurrency::task<bool> launchUriOperation(Windows::System::Launcher::LaunchUriAsync(uri));
launchUriOperation.then([this](bool success)   
{         
    if (success)         
    {             
        // URI launched  
        resultText->Text += " (URI Launched)"; 
    } 
    else         
    {             
        // URI launch failed             
        resultText->Text += " (FAILED)";
    }     
});  

Place a call to test your code

  1. Run your app on the HoloLens.

  2. Initiate the call from your app.

  3. The HoloLens appears to close the app, open Dynamics 365 Remote Assist if it isn’t already open, and sign in.

  4. After the contacts panel is loaded, Dynamics 365 Remote Assist will place a call to the specified contact.

For more information on launching an app with a URI, see Launch an app with a URI.