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

You can embed code in your HoloLens application 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 will launch Dynamics 365 Remote Assist and call the designated expert.

Dynamics 365 Remote Assist 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 Azure Active Directory (Azure AD) object ID.

Code example

You’ll need to 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

An additional "returnto" field can be included to have Dynamics 365 Remote Assist return to your application when a call ends. This 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 example below, "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 will appear 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.

See also

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