question

LarryF-3572 avatar image
0 Votes"
LarryF-3572 asked brianobr commented

EventHub Namespace Can't Create Schema Registry Group

I have a standard tier Event Hub Namespace. I have tried to create a Schema Registry multiple times and it fails. This should work but does not. How can this be resolved? Can someone from Microsoft contact me privately and I can provide the specific tracking ID, my subscription info, etc.

Error Info:
Failed to add schema group 'MYTESTSCHEMA' with error: {"Code":401,"Detail":"Authorization failed for specified action: SchemaGroupWrite. TrackingId:SOME_ID,

azure-event-hubs
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The role Schema Registry Contributor (Preview) is sufficient.

0 Votes 0 ·
PhilippR-6918 avatar image
0 Votes"
PhilippR-6918 answered PhilippR-6918 edited

I have the exact same issue and am pretty much stuck, too. Read lots of MS documentation, tried the dotNet management clients, but couldn't find a way to resolve this myself.
I also tried the dotNet SchemaRegistryClient to connect to the registry, trying to create a schema group in this way, however then it complains that the used schema group "testgroup" does not exist yet and auto-creation was disabled. No idea how I could change that, either. It's also lacking an option to create a schema group there.

Below my schema registry client code, for the sake of completeness:

 var client = new SchemaRegistryClient(_SCHEMA_REGISTRY_ENDPOINT, new DefaultAzureCredential());
 string testSchema = "{ \"name\": \"name\", \"type\": \"string\" }";
    
 var response = client.RegisterSchema("testgroup", "testname", SerializationType.Avro, testSchema, CancellationToken.None);

Btw, @LarryF-3572, I think the title is a bit misleading, because the registry itself is there right from the start - only groups cannot be created.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LarryF-3572 avatar image
2 Votes"
LarryF-3572 answered karankundal commented

I might be able to tell you how to fix this. I worked with the IT people at my employer and they had me make a change for role assignments and that fixed it. I use the Azure account that is provided as part of my MSDN subscription from my employer.

Go to All services->Subscriptions->Your Subscription (in my case Visual Studio Enterprise Subscription - MPN)

Then click on the Access Control (IAM) link on the left near the top of the list. After that look at "Role Assignments" tab in the content pane on the right. If you do not see yourself then add yourself as "Owner." In my case, the IT person that administers our Azure account at work was listed but I was not. After adding yourself give it a few minutes for the permissions to replicate into the system. After that I was able to create the Schema Registry Group without an issue. I was never listed as "Owner" here before but I never had any issue creating many features in Azure portal. However, this feature would not work until I was made an owner.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Good Job Larry... On spot... Worked like magic.. this is in 2021.. and still working :)

0 Votes 0 ·
PhilippR-6918 avatar image
0 Votes"
PhilippR-6918 answered

Hi @LarryF-3572, thanks for your reply. It actually worked, thank you so much.

I would still expect this should be possible without "Owner" rights and should be corrected.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.