locked
Create Azure File using API - Create Permission Body Crafting RRS feed

  • Question

  • Hello, I am building the Powershell function which is meant to create an Azure File using the API calls.

    One of the requirements for the API header is to contain x-ms-file-permission-key

    Looking at the documentation of the header creation - https://docs.microsoft.com/en-us/rest/api/storageservices/create-permission I have prepared the code. Once I call my function, I receive the following error:

    MissingRequiredHeaderAn HTTP header that's mandatory for this request is not specified.
    RequestId:0f5f496b-001a-005b-033c-0ea152000000
    Time:2020-04-09T06:56:51.9721384Zx-ms-file-permission-key

    From the error I can see clearly that I did not deliver the body.

    Request body documentation says the following: 

    To create a security descriptor, the request body is a JSON document that describes permission in the Security Descriptor Definition Language (SDDL). SDDL must have an owner, group, and discretionary access control list (DACL). The provided SDDL string format

    Can you please provide some clear example on how to craft the SDDL body part?

    Thursday, April 9, 2020 7:54 AM

All replies

  •  @Nemanja.Jovic Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused. Are you trying to create Azure File share using REST API? 

    PUT https://myaccount.file.core.windows.net/myshare?restype=share HTTP/1.1  
    
    equest Headers:  
    x-ms-version: 2015-02-21  
    x-ms-date: <date>  
    x-ms-meta-Name: StorageSample  
    Authorization: SharedKey myaccount:Z5043vY9MesKNh0PNtksNc9nbXSSqGHueE00JdjidOQ=
    You may also refer to the suggestion mentioned in this article

    Hope this helps! 

    Kindly let us know if the above helps or you need further assistance on this issue.
    ------------------------------------------------------------------------------------------

    Do click on "Mark as Answer" and Upvote on the post that helps you, this can be beneficial to other community members  

    Tuesday, April 14, 2020 4:23 PM
  •  @Nemanja.Jovic  Is there any update on the issue?

    If the suggested answer helped for your issue, do click on "Mark as Answer" and “Vote as Helpful” on the post that helps you, this can be beneficial to other community members.

    Wednesday, April 22, 2020 5:21 AM
  • @Nemanja.Jovic  Is there any update on the issue?

    If the suggested answer helped for your issue, do click on "Mark as Answer" and “Vote as Helpful” on the post that helps you, this can be beneficial to other community members.

    Monday, April 27, 2020 3:42 PM
  • Is there any update on the issue?

    If the suggested answer helped for your issue, do click on "Mark as Answer" and “Vote as Helpful” on the post that helps you, this can be beneficial to other community members.

    Wednesday, May 6, 2020 3:50 PM