Help us shape the future of Go! Take the 2026 Go Developer Survey

entraid

package
v1.37.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureCredentials

type AzureCredentials struct {
	ClientId       string `json:"clientId"`
	ClientSecret   string `json:"clientSecret"`
	SubscriptionId string `json:"subscriptionId"`
	TenantId       string `json:"tenantId"`
}

Required model structure for Azure Credentials tools

type CreateOrUpdateServicePrincipalOptions

type CreateOrUpdateServicePrincipalOptions struct {
	RolesToAssign              []string
	Description                *string
	ServiceManagementReference *string
}

type EnsureRoleAssignmentsOptions

type EnsureRoleAssignmentsOptions struct {
	// Scope overrides the implicit Subscription level scope used by EnsureRoleAssignments.
	Scope *string
}

type EntraIdService

type EntraIdService interface {
	GetServicePrincipal(
		ctx context.Context,
		subscriptionId string,
		appIdOrName string,
	) (*graphsdk.ServicePrincipal, error)
	CreateOrUpdateServicePrincipal(
		ctx context.Context,
		subscriptionId string,
		appIdOrName string,
		options CreateOrUpdateServicePrincipalOptions,
	) (*graphsdk.ServicePrincipal, error)
	ResetPasswordCredentials(
		ctx context.Context,
		subscriptionId string,
		appId string,
	) (*AzureCredentials, error)
	ApplyFederatedCredentials(
		ctx context.Context,
		subscriptionId string,
		clientId string,
		federatedCredentials []*graphsdk.FederatedIdentityCredential,
	) ([]*graphsdk.FederatedIdentityCredential, error)
	CreateRbac(ctx context.Context, subscriptionId string, scope, roleId, principalId string) error
	EnsureRoleAssignments(
		ctx context.Context,
		subscriptionId string,
		roleNames []string,
		servicePrincipal *graphsdk.ServicePrincipal,
		options *EnsureRoleAssignmentsOptions,
	) error
}

EntraIdService provides actions on top of Azure Active Directory (AD)

func NewEntraIdService

func NewEntraIdService(
	credentialProvider account.SubscriptionCredentialProvider,
	armClientOptions *arm.ClientOptions,
	coreClientOptions *azcore.ClientOptions,
) EntraIdService

Creates a new instance of the EntraIdService

type ServiceTreeInvalidError

type ServiceTreeInvalidError struct {
	ApplicationName string
	Err             error
}

ServiceTreeInvalidError represents an error that occurs when invalid value is provider for service tree id

func (*ServiceTreeInvalidError) Error

func (e *ServiceTreeInvalidError) Error() string

func (*ServiceTreeInvalidError) Unwrap

func (e *ServiceTreeInvalidError) Unwrap() error

type ServiceTreeNullValueError

type ServiceTreeNullValueError struct {
	ApplicationName string
	Err             error
}

ServiceTreeNullValueError represents an error that occurs when a null value is provided for ServiceManagementReference

func (*ServiceTreeNullValueError) Error

func (e *ServiceTreeNullValueError) Error() string

func (*ServiceTreeNullValueError) Unwrap

func (e *ServiceTreeNullValueError) Unwrap() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL