Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Answered

How do I stream/access a video file that's stored in the Dataverse in Unity?

(0) ShareShare
ReportReport
Posted on by 15

I have a Unity application that's currently accessing the Dataverse and correctly pulling some 'text' information from a table

The issue that I'm facing is that I'm trying to pull down a test video file that I have uploaded to the Dataverse

I was researching the error code "0x80070005" and it seems to be linked to "Permissions" 

 

When in the Unity application I'm able to generate an Access token and retrieve data so I don't think that my problem is linked to an access token

I was thinking that my issue is linked to 'file permissions' as I can see a lock symbol beside the name of the file, but I cannot seem to change its access/permission rights for that specific file.

I can download the file in Postman

orgxxxxxxxxxxx.crm4.dynamics.com/.../$value

pastedimage1638919656646v1.pngpastedimage1638919697572v2.pngpastedimage1638919789638v3.png

  • RE: How do I stream/access a video file that's stored in the Dataverse in Unity?

     Oren Shir Thanks for your help

    My problem was that I didn't fully understand how to use GetFileSasUrl

    I spent some more time on it and I was able to acquire a sas URL, 

    I tested it out in Unity and it worked

     pastedimage1639499178548v1.png

  • Oren Shir Profile Picture
    Oren Shir on at
    RE: How do I stream/access a video file that's stored in the Dataverse in Unity?

    I'm not sure what your full scenario is. Getting full storage SAS token is limited to customizer role and the token is for an hour. The token gives access to many records, so you bypass Dataverse security. For regular user facing scenarios I the API I mentioned is more appropriate. Another option is to download the file locally and point your player to the temporary cache folder.

  • RE: How do I stream/access a video file that's stored in the Dataverse in Unity?

    Thanks for your help,

    The video player that's used in Unity actually does not support adding additional headers to the API

    I'm currently investigating it more to see what I can accomplish, this is another example of the same issue that's facing

    forum.unity.com/.../

    I was investigating "SAS Tokens" and following this guide docs.microsoft.com/.../storage-sas-token

    Unfortunately, I bumped into a slight issue when following it: powerusers.microsoft.com/.../1383624

    That's I'm currently resolving

    I did an experiment with placing the same file on an azure storage container and accessing it through a SAS token that was appended to the URL and it worked perfectly fine if was able to do the same

    My goal at the moment is to see if I can do the same thing with Dataverse

  • Verified answer
    Oren Shir Profile Picture
    Oren Shir on at
    RE: How do I stream/access a video file that's stored in the Dataverse in Unity?

    How is your video player configured to authenticate when using the URL? It should send the bearer token in a header, and it probably had some expectations on what headers are returned.

    You can consider using GetFileSasUrl Function (Microsoft.Dynamics.CRM) | Microsoft Docs as well, it might work with the video player you're using.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,431 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans