Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

delete files on lakehouse using mssparkutils.fs.rm(path1,True)

Hi,

 

when running on notebook

mssparkutils.fs.rm(path,True)

 

I get AuthorizationFailure, "This request is not authorized to perform this operation.".

 

Path refers to onelake that is on the lakehouse the notebook also is.

 

thanks in advance for your help 

7 Replies

  • v-cboorla-msft's avatar
    v-cboorla-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous 

     

    Thanks for using Microsoft Fabric Community.

     

    The error "AuthorizationFailure, This request is not authorized to perform this operation." indicates that your Spark session doesn't have the necessary permissions to delete the file or directory using mssparkutils.fs.rm.

    I tried to repro the scenario and successfully deleted the table without facing any difficulty. Could you please re-check you premissions and try again.

     

    I hope this information helps. Please do let us know if you have any further queries.

     

    Thank you.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Ho, thabks for your reply. where can i check my permissions ?

      • v-cboorla-msft's avatar
        v-cboorla-msft
        Icon for Microsoft Employee rankMicrosoft Employee

        Hi Anonymous 

         

        To assist you with checking permissions for your Lakehouse, I've included some screenshots below. Please take a look and let me know if you have any questions.

        I hope this informations helps.

         

        Thank you.

  • Anonymous's avatar
    Anonymous
    Not applicable

    I am the workspace admin, and i still get error message  Operation failed: "Forbidden", 403, DELETE,. the path references to files and not tables as you tried 

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    I choose the first path with '/files/' at the end. and get error! by the way since there is just one onelake why do we have three paths ? the others does not have any files

    • v-cboorla-msft's avatar
      v-cboorla-msft
      Icon for Microsoft Employee rankMicrosoft Employee

      Hi Anonymous 

       

      Apologies for the inconvenience and the delay in response.

      Please reach out to our support team to gain deeper insights and explore potential solutions. It's highly recommended that you reach out to our support team. Their expertise will be invaluable in suggesting the most appropriate approach.

      Please go ahead and raise a support ticket to reach our support team:

      https://support.fabric.microsoft.com/support

      After creating a Support ticket please provide the ticket number as it would help us to track for more information.

       

      Thank you.

      • v-cboorla-msft's avatar
        v-cboorla-msft
        Icon for Microsoft Employee rankMicrosoft Employee

        Hi Anonymous 

         

        We haven’t heard from you on the last response and was just checking back to see if you've had a chance to submit a support ticket. If you have, a reference to the ticket number would be greatly appreciated. This will allow us to track the progress of your request and ensure you receive the most efficient support possible.

         

        Thank you.