Azure-Samples / Azure-Samples/rag-data-openai-python-promptflow

Flow fails to initialize with error "Principal does not have access to API/Operation"

Đang mở
#28 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
290
Fork
152
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

> Please provide us with the following information:
> ---------------------------------------------------------------

### This issue is for a: (mark with an `x`)
```
- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```

### Minimal steps to reproduce
> Follow steps up 'til 4, then run `pf flow test` command.

### Any log messages given by the failure
> As follows:
```
vscode ➜ /workspaces/rag-data-openai-python-promptflow/src (main) $ pf flow test --flow ./copilot_flow --inputs chat_input="how much do the Trailwalker shoes cost?"
Prompt flow service has started...
You can view the trace detail from the following URL:
http://127.0.0.1:23333/v1.0/ui/traces/?#collection=copilot_flow&uiTraceId=0x1d990b212f7a159e901e846e40801416
pf.flow.test failed with UserErrorException: AuthenticationError: Execution failure in 'get_chat_response': (AuthenticationError) Error code: 401 - {'error': {'code': 'PermissionDenied', 'message': 'Principal does not have access to API/Operation.'}}
```

### Expected/desired behavior
> I would expect a 0 exit code and some response from pf. Given the error, I'd like a more descriptive log so I could try debugging the auth issue. I'm not sure where to start.

### OS and Version?
> provided debian 12 dev container running on WSL 2 Docker on Windows 11.

### Versions
> git hash `7e8e6b04727364b2a608fd62b2efa1ffa322d266`

### Mention any other details that might be useful

> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện `pf flow test --flow ./copilot_flow --inputs chat_input="how much do the Trailwalker shoes cost?"` và kiểm tra đường dẫn thực thi `get_chat_response` được nêu trong lỗi. Truy vết phản hồi 401 và các quyền của principal/API operation đã được cấu hình; hoàn tất khi flow trả về phản hồi với mã thoát 0 hoặc log xác định rõ yêu cầu xác thực.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
authentication
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.