RpcException: Status(StatusCode="PermissionDenied", Detail="User not authorized to perform this action.")

Viewed 54

I have been trying to send messages to the publisher in Google cloud pub/sub in a .net environment,

TopicName topicName = new TopicName("abc", "abc-topic");
PublisherClient publisher = await PublisherClient.CreateAsync(topicName);
string messageId = await publisher.PublishAsync("Hello, Pubsub");

and getting this error

RpcException: Status(StatusCode="PermissionDenied", Detail="User not authorized to perform this action.")

A service account with Pub/sub admin as well as editor, publisher, subscriber and viewer is also assigned as role to it.

https://cloud.google.com/pubsub/docs/admin - The resource which I followed


0 Answers
Related