zitadel/internal/api/grpc/management/iam.go
2022-06-03 14:30:39 +02:00

20 lines
426 B
Go

package management
import (
"context"
mgmt_pb "github.com/zitadel/zitadel/pkg/grpc/management"
)
func (s *Server) GetIAM(ctx context.Context, _ *mgmt_pb.GetIAMRequest) (*mgmt_pb.GetIAMResponse, error) {
iam, err := s.query.Instance(ctx)
if err != nil {
return nil, err
}
return &mgmt_pb.GetIAMResponse{
GlobalOrgId: iam.DefaultOrgID,
DefaultOrgId: iam.DefaultOrgID,
IamProjectId: iam.IAMProjectID,
}, nil
}