Document understanding: Data Extraction Scope: Request is unauthorized

Data Extraction Scope: Request is unauthorized. Please make sure that a correct API Key was provided

The main cause of this would be around:
One need to check if they are using consistent community key with community endpoint or enterprise key with enterprise endpoint as shown in below snippet:

For more details one can refer to our online Document understanding API key.