Skip to content

The feature 'TrustedAccessPreview' could not be found. #32059

@aoshfan

Description

@aoshfan

Describe the bug

I got below error when running my script, please provide what command i should using now since it's no longer work.

Script

provider_registration() {
  #Need to refresh the provider to apply the feature changes
  while true; do
    is_feature_registered=$(az feature show \
    --namespace "Microsoft.ContainerService" \
    --name "TrustedAccessPreview" \
    -o yaml|grep state|awk '{print $2}'|tr '[:upper:]' '[:lower:]')
    # Check if the process is still running
    if [[ "$is_feature_registered" == "registering" ]]; then
        echo "TrustedAccessPreview Feature registration is still in progress..."
        sleep 60  # Sleep for 60 seconds 
    else
        echo "Registration is complete."
        az provider register \
        --namespace Microsoft.ContainerService
        break
    fi
  done
}

feature_registration() {
    is_feature_registered=$(az feature show \
    --namespace "Microsoft.ContainerService" \
    --name "TrustedAccessPreview" \
    -o yaml|grep state|awk '{print $2}'|tr '[:upper:]' '[:lower:]')
    
    if [[ "$is_feature_registered" == "registered" ]]; then
      echo "The TrustedAccessPreview feature is already registered"
    else
       az feature register \
       --namespace "Microsoft.ContainerService" \
       --name "TrustedAccessPreview"
       provider_registration
    fi
}

Related command

az feature show --namespace "Microsoft.ContainerService" --name "TrustedAccessPreview"
az feature register  --namespace "Microsoft.ContainerService"  --name "TrustedAccessPreview" provider_registration

Errors

EnvironmentName    HomeTenantId                          IsDefault    Name
State    TenantId
-----------------  ------------------------------------  -----------
---------------  -------  ------------------------------------
AzureCloud         <XXXX>  True
product-nprd-uat  Enabled  <XXXX>
ERROR: (FeatureNotFound) The feature 'TrustedAccessPreview' could not be
found.
Code: FeatureNotFound
Message: The feature 'TrustedAccessPreview' could not be found.

Issue script & Debug output

N/A

Expected behavior

Register TrustedAccessPreview feature

Environment Summary

N/A

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Container ServiceService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions