WithReference to an Azure Foundry project resource doesn't assign the right roles
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
Attempting to give a Node app permissions on. Foundry project, accessed through AIProjectClient, the correct role to permit this per [documentation]( https://learn.microsoft.com/en-us/azure/foundry/concepts/authentication-authorization-foundry) is Azure AI User. I want to invoke existing agents and not create or modify anything within the project, so this is sufficient and I've proved this. When I assign this myself manually, project works, when I don't, it doesn't. The available roles in withRoleAssignment are different to this and seem to be legacy. I tried overriding to assign the right role but in Typescript, the FoundryRole enum doesn't include the role I require and I didn't find a way to break out of this resource-specific extension method and get 'normal' behaviour which I would expect to allow me to assign any role.
#15971 is similar but not the same
### Expected Behavior
_No response_
### Steps To Reproduce
_No response_
### Exceptions (if any)
_No response_
### Aspire doctor output
_No response_
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.