none
Office 365 Video Issue - what role can upload video file via Video APIs? RRS feed

  • Question

  • Hi,

    I'm using Office 365 Video to storage some video files.

    Now, I need to using a specified account(Video Admin, or Video Channel Admin) to access Video APIs and manage these videos.

    I found a solution : register an Azure AD Native Application, and using following code to obtain an AccessToken.

    AuthenticationContext authContext = new AuthenticationContext("https://login.microsoftonline.com/common");
    var credential = new UserCredential("O365VideoAdminAccount", "Pwd");
    var token = authContext.AcquireToken("SiteUrl", AzureADClientId, credential);

    But when I calling Video API to upload a file via this AccessToken, it's returned an error:

    System.Exception: Code:Unauthorized, Error:{"odata.error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access denied. You do not have permission to perform this action or access this resource."}}}

    I can use this account upload a file or create a Channel on Office 365 Video portal, but in this code it doesn't work.

    It is strange that when I replace an Global Admin on it, it's worked fine.

    Is there must be an Global Admin account? Or what's wrong with my code?

    ---------------------------------------------------------------------------------------------

    I'm sure this account in the Video admins group. 

    I already analysised the AccessToken, there are five permissions in it: AllSites.Manage AllSites.Read AllSites.Write MyFiles.Read MyFiles.Write

    Worthy of note is, when I obtain AuthCode first and getting AccessToken via AuthCode(not getting AccessToken via account & pwd directly) using the same AAD App and same account, it's worked fine.

    So, I want to know is there have some special control (specified account must be an Global Admin or others?), or it's a bug?

    We are very worried, because it relates to whether or not we want to store the video files on Office 365.


    Sorry for my terrible English. Any help will be appreciated.

    Thanks,

    Oliver

    Tuesday, September 6, 2016 11:48 AM