Open vRune4 opened 1 week ago
Thank you for your feedback. Tagging and routing to the team member best able to assist.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jpalvarezl @ralph-msft @trrwilson.
Hi @vRune4,
Can you please provide more details on how you've assigned yourself the 'Cognitive Services OpenAI Contributor' role? Also, what type of .NET project are you using?
/cc @scottaddie
I assigned myself that role through the portal.
Get-AzRoleAssignment | where Scope -eq '/subscriptions/$mysub/resourceGroups/rg-mine-dev/providers/Microsoft.CognitiveServices/accounts/oai-mine-dev'
returns this:
Scope : /subscriptions/$mysub/resourceGroups/rg-mine-dev/providers/Microsoft
.CognitiveServices/accounts/oai-mine-dev
DisplayName : <my user>
RoleDefinitionName : Cognitive Services OpenAI Contributor
This is a plain standard .net 8 console project.
Library name and version
Azure.AI.OpenAI 2.0.0
Describe the bug
I have an existing project that works fine with an API key, but I want to use RBAC instead.
I've assigned myself the 'Cognitive Services OpenAI Contributor' role and I'm executing code that looks something like this:
This project also connects to the Search Service, and that works fine with RBAC. That said, there are a dozen roles to choose from, and maybe I just haven't hit the right one yet. (feels like I've tried them all by now though)
Expected behavior
Should return a valid result.
Actual behavior
Throws exception.
Log:
Error response:
Reproduction Steps
Environment