<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic AutoML: 403 Error error_code:&amp;quot;PERMISSION_DENIED&amp;quot; in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/automl-403-error-error-code-quot-permission-denied-quot/m-p/127802#M4188</link>
    <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;I am using AutoML on my AutoML enabled cluster and have a service principle. Here is the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;features_for_split = df.drop(columns=['cae_type', 'id']).select_dtypes(include=[np.number])
target_for_split = df['cae_type']

# Use same random state as client's code for identical split
X_train, X_test, y_train, y_test = train_test_split(
    features_for_split, target_for_split, 
    test_size=0.2, 
    random_state=42,
    # Ensure balanced splits for imbalanced data
    #stratify=target_for_split
)

# Create training DataFrame for AutoML
train_df = X_train.copy()
train_df['cae_type'] = y_train

# Configure AutoML experiment
experiment_auto_ml_manual_split = f"CAE_MANUAL_split_{datetime.now().strftime('%Y%m%d_%H%M%S')}"

# Run AutoML with client's data split
automl_result = automl.classify(
    dataset=train_df,
    target_col="cae_type",
    primary_metric="f1",
    timeout_minutes=180,
    experiment_dir=experiment_dir,
    experiment_name=experiment_name
)&lt;/LI-CODE&gt;&lt;P&gt;I am getting the following error where experiment_dir&amp;nbsp;/Workspace/Users/myeamail@domain.com/&lt;BR /&gt;AutomlServiceError: Failed to create Automl experiment. Status Code: 403 Error: b'{"error_code":"PERMISSION_DENIED","message":"MY_SERVICE_PRINCIPLE does not have View permissions on 0. Please contact the owner or an administrator for access.","details":[{"@type":"type.googleapis.com/google.rpc.RequestInfo","request_id":"a53d66d5-ff67-43f4-97e5-bd95b5de46d0","serving_data":""}]}'&lt;BR /&gt;&lt;BR /&gt;According to chatgpt and to the article&amp;nbsp;&lt;A href="https://kb.databricks.com/machine-learning/permission_denied-error-while-running-automl-experiment-with-group-assigned-cluster" target="_blank"&gt;https://kb.databricks.com/machine-learning/permission_denied-error-while-running-automl-experiment-with-group-assigned-cluster&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Group-assigned clusters always run as the group principal, not as your individual user.&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Anything the cluster writes or reads must therefore live in a location where &lt;STRONG&gt;the &lt;EM&gt;group&lt;/EM&gt; has at least “CAN MANAGE”&lt;/STRONG&gt; (or “CAN EDIT”) permissions.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;You created /Workspace/Users/myemail@domain.com/…, which your &lt;STRONG&gt;user&lt;/STRONG&gt; can reach—but the cluster’s &lt;STRONG&gt;group&lt;/STRONG&gt; cannot.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;AutoML tries to create the MLflow experiment inside experiment_dir. Because the group principal can’t see that folder, MLflow’s underlying “create experiment” call is rejected with&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The article&amp;nbsp;is clear.. create a Group folder under Workspace and assign the correct permission to it.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;group_name &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"XXXX"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;experiment_dir &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"/Workspace/Groups/&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;group_name&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/automl_experiments"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;experiment_name &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"manual_split_&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;datetime.&lt;/SPAN&gt;&lt;SPAN&gt;now&lt;/SPAN&gt;&lt;SPAN&gt;():&lt;/SPAN&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;SPAN&gt;Y&lt;/SPAN&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;SPAN&gt;m&lt;/SPAN&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;SPAN&gt;d_&lt;/SPAN&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;SPAN&gt;H&lt;/SPAN&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;SPAN&gt;M&lt;/SPAN&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;SPAN&gt;S&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;dbutils.fs.&lt;/SPAN&gt;&lt;SPAN&gt;mkdirs&lt;/SPAN&gt;&lt;SPAN&gt;(experiment_dir)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Yet I am not being able top see the created folder "Groups/{group_name}" under Workspace. Is this due to my lack of Admin Rights? Because when I check whether the folders exist, the response is positive&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Aug 2025 12:06:38 GMT</pubDate>
    <dc:creator>spearitchmeta</dc:creator>
    <dc:date>2025-08-08T12:06:38Z</dc:date>
    <item>
      <title>AutoML: 403 Error error_code:"PERMISSION_DENIED"</title>
      <link>https://community.databricks.com/t5/machine-learning/automl-403-error-error-code-quot-permission-denied-quot/m-p/127802#M4188</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;I am using AutoML on my AutoML enabled cluster and have a service principle. Here is the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;features_for_split = df.drop(columns=['cae_type', 'id']).select_dtypes(include=[np.number])
target_for_split = df['cae_type']

# Use same random state as client's code for identical split
X_train, X_test, y_train, y_test = train_test_split(
    features_for_split, target_for_split, 
    test_size=0.2, 
    random_state=42,
    # Ensure balanced splits for imbalanced data
    #stratify=target_for_split
)

# Create training DataFrame for AutoML
train_df = X_train.copy()
train_df['cae_type'] = y_train

# Configure AutoML experiment
experiment_auto_ml_manual_split = f"CAE_MANUAL_split_{datetime.now().strftime('%Y%m%d_%H%M%S')}"

# Run AutoML with client's data split
automl_result = automl.classify(
    dataset=train_df,
    target_col="cae_type",
    primary_metric="f1",
    timeout_minutes=180,
    experiment_dir=experiment_dir,
    experiment_name=experiment_name
)&lt;/LI-CODE&gt;&lt;P&gt;I am getting the following error where experiment_dir&amp;nbsp;/Workspace/Users/myeamail@domain.com/&lt;BR /&gt;AutomlServiceError: Failed to create Automl experiment. Status Code: 403 Error: b'{"error_code":"PERMISSION_DENIED","message":"MY_SERVICE_PRINCIPLE does not have View permissions on 0. Please contact the owner or an administrator for access.","details":[{"@type":"type.googleapis.com/google.rpc.RequestInfo","request_id":"a53d66d5-ff67-43f4-97e5-bd95b5de46d0","serving_data":""}]}'&lt;BR /&gt;&lt;BR /&gt;According to chatgpt and to the article&amp;nbsp;&lt;A href="https://kb.databricks.com/machine-learning/permission_denied-error-while-running-automl-experiment-with-group-assigned-cluster" target="_blank"&gt;https://kb.databricks.com/machine-learning/permission_denied-error-while-running-automl-experiment-with-group-assigned-cluster&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Group-assigned clusters always run as the group principal, not as your individual user.&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Anything the cluster writes or reads must therefore live in a location where &lt;STRONG&gt;the &lt;EM&gt;group&lt;/EM&gt; has at least “CAN MANAGE”&lt;/STRONG&gt; (or “CAN EDIT”) permissions.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;You created /Workspace/Users/myemail@domain.com/…, which your &lt;STRONG&gt;user&lt;/STRONG&gt; can reach—but the cluster’s &lt;STRONG&gt;group&lt;/STRONG&gt; cannot.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;AutoML tries to create the MLflow experiment inside experiment_dir. Because the group principal can’t see that folder, MLflow’s underlying “create experiment” call is rejected with&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The article&amp;nbsp;is clear.. create a Group folder under Workspace and assign the correct permission to it.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;group_name &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"XXXX"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;experiment_dir &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"/Workspace/Groups/&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;group_name&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/automl_experiments"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;experiment_name &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"manual_split_&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;datetime.&lt;/SPAN&gt;&lt;SPAN&gt;now&lt;/SPAN&gt;&lt;SPAN&gt;():&lt;/SPAN&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;SPAN&gt;Y&lt;/SPAN&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;SPAN&gt;m&lt;/SPAN&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;SPAN&gt;d_&lt;/SPAN&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;SPAN&gt;H&lt;/SPAN&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;SPAN&gt;M&lt;/SPAN&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;SPAN&gt;S&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;dbutils.fs.&lt;/SPAN&gt;&lt;SPAN&gt;mkdirs&lt;/SPAN&gt;&lt;SPAN&gt;(experiment_dir)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Yet I am not being able top see the created folder "Groups/{group_name}" under Workspace. Is this due to my lack of Admin Rights? Because when I check whether the folders exist, the response is positive&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2025 12:06:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/automl-403-error-error-code-quot-permission-denied-quot/m-p/127802#M4188</guid>
      <dc:creator>spearitchmeta</dc:creator>
      <dc:date>2025-08-08T12:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: AutoML: 403 Error error_code:"PERMISSION_DENIED"</title>
      <link>https://community.databricks.com/t5/machine-learning/automl-403-error-error-code-quot-permission-denied-quot/m-p/127811#M4189</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/178472"&gt;@spearitchmeta&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;When you're using following code, you're interacting wiht dbfs and there are several limitations that apply to dbutils when it comes to interacting with Workspace files..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;dbutils.fs.mkdirs(experiment_dir)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;It's confusing but you can read about the difference here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/aws/en/dev-tools/databricks-utils#file-system-utility-dbutilsfs" target="_blank" rel="noopener"&gt;Databricks Utilities (dbutils) reference | Databricks Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So, your folder should exists but not in the place where you wanted it to be. I've recreated your example, check screenshot below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="szymon_dybczak_0-1754659214390.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/18851i4505B51F8C0295C6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="szymon_dybczak_0-1754659214390.png" alt="szymon_dybczak_0-1754659214390.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you can see, the folder was created but under Workspace directory that resides in dbfs (which is different from workspace files you see in UI).&lt;/P&gt;&lt;P&gt;You wanted to create a directory in a Workspace. You can do it through UI or using %sh:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%sh
mkdir -p /Workspace/Groups/XXXX/automl_experiments&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After executing above command, new directory appeared in my workspace:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="szymon_dybczak_1-1754659506543.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/18852iF1AEBF2993DA065F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="szymon_dybczak_1-1754659506543.png" alt="szymon_dybczak_1-1754659506543.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course, when you create this new folder you need to assing proper permission to it for you group - namely CAN MANAGE permission.&lt;/P&gt;&lt;P&gt;Once you perform above steps your code should work.&lt;/P&gt;&lt;P&gt;Edit:&amp;nbsp;&lt;SPAN&gt;Make sure that whatever group you are using has the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;"Workspace Access"&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;entitlement enabled.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2025 13:37:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/automl-403-error-error-code-quot-permission-denied-quot/m-p/127811#M4189</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2025-08-08T13:37:49Z</dc:date>
    </item>
  </channel>
</rss>

