graphsdk

package
v0.0.0-...-1fd3d55 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const HostName = "graph.microsoft.com"

The host name for the Graph API.

Variables

View Source
var ServiceConfig cloud.ServiceConfiguration = cloud.ServiceConfiguration{
	Audience: "https://graph.microsoft.com",
	Endpoint: "https://graph.microsoft.com/v1.0",
}

Functions

func NewPipeline

func NewPipeline(
	credential azcore.TokenCredential,
	serviceConfig cloud.ServiceConfiguration,
	clientOptions *azcore.ClientOptions,
) runtime.Pipeline

Creates a new Azure HTTP pipeline used for Graph SDK clients

func SetHttpRequestBody

func SetHttpRequestBody(req *policy.Request, value any) error

Creates a JSON serialized HTTP request body

Types

type Application

type Application struct {
	Id                  *string                          `json:"id"`
	AppId               *string                          `json:"appId"`
	DisplayName         string                           `json:"displayName"`
	Description         *string                          `json:"description"`
	PasswordCredentials []*ApplicationPasswordCredential `json:"passwordCredentials"`
}

A Microsoft Graph Application entity.

type ApplicationAddPasswordRequest

type ApplicationAddPasswordRequest struct {
	PasswordCredential ApplicationPasswordCredential `json:"passwordCredential"`
}

type ApplicationAddPasswordResponse

type ApplicationAddPasswordResponse struct {
	ApplicationPasswordCredential
}

type ApplicationCreateRequest

type ApplicationCreateRequest struct {
	Application
}

type ApplicationItemRequestBuilder

type ApplicationItemRequestBuilder struct {
	*EntityItemRequestBuilder[ApplicationItemRequestBuilder]
}

func NewApplicationItemRequestBuilder

func NewApplicationItemRequestBuilder(client *GraphClient, id string) *ApplicationItemRequestBuilder

func (*ApplicationItemRequestBuilder) AddPassword

func (*ApplicationItemRequestBuilder) Delete

Gets a Microsoft Graph Application for the specified application identifier

func (*ApplicationItemRequestBuilder) FederatedIdentityCredentialById

func (c *ApplicationItemRequestBuilder) FederatedIdentityCredentialById(
	id string,
) *FederatedIdentityCredentialItemRequestBuilder

func (*ApplicationItemRequestBuilder) FederatedIdentityCredentials

func (*ApplicationItemRequestBuilder) Get

Gets a Microsoft Graph Application for the specified application identifier

func (*ApplicationItemRequestBuilder) GetByAppId

func (*ApplicationItemRequestBuilder) RemovePassword

func (c *ApplicationItemRequestBuilder) RemovePassword(ctx context.Context, keyId string) error

type ApplicationListRequestBuilder

type ApplicationListRequestBuilder struct {
	*EntityListRequestBuilder[ApplicationListRequestBuilder]
}

func NewApplicationListRequestBuilder

func NewApplicationListRequestBuilder(client *GraphClient) *ApplicationListRequestBuilder

func (*ApplicationListRequestBuilder) Get

Gets a list of applications that the current logged in user has access to.

func (*ApplicationListRequestBuilder) Post

type ApplicationListResponse

type ApplicationListResponse struct {
	Value []Application `json:"value"`
}

A list of applications returned from the Microsoft Graph.

type ApplicationPasswordCredential

type ApplicationPasswordCredential struct {
	KeyId               *string    `json:"keyId"`
	CustomKeyIdentifier *string    `json:"customKeyIdentifier"`
	DisplayName         *string    `json:"displayName"`
	StartDateTime       *time.Time `json:"startDateTime"`
	EndDateTime         *time.Time `json:"endDateTime"`
	SecretText          *string    `json:"secretText"`
	Hint                *string    `json:"hint"`
}

type ApplicationRemovePasswordRequest

type ApplicationRemovePasswordRequest struct {
	KeyId string `json:"keyId"`
}

type EntityItemRequestBuilder

type EntityItemRequestBuilder[T any] struct {
	// contains filtered or unexported fields
}

func (*EntityItemRequestBuilder[T]) Select

func (b *EntityItemRequestBuilder[T]) Select(params []string) *T

type EntityListRequestBuilder

type EntityListRequestBuilder[T any] struct {
	// contains filtered or unexported fields
}

func (*EntityListRequestBuilder[T]) Filter

func (b *EntityListRequestBuilder[T]) Filter(filterExpression string) *T

func (*EntityListRequestBuilder[T]) Top

func (b *EntityListRequestBuilder[T]) Top(count int) *T

type FederatedIdentityCredential

type FederatedIdentityCredential struct {
	Id          *string  `json:"id"`
	Name        string   `json:"name"`
	Issuer      string   `json:"issuer"`
	Subject     string   `json:"subject"`
	Description *string  `json:"description"`
	Audiences   []string `json:"audiences"`
}

type FederatedIdentityCredentialItemRequestBuilder

type FederatedIdentityCredentialItemRequestBuilder struct {
	*EntityItemRequestBuilder[FederatedIdentityCredentialItemRequestBuilder]
	// contains filtered or unexported fields
}

func NewFederatedIdentityCredentialItemRequestBuilder

func NewFederatedIdentityCredentialItemRequestBuilder(
	client *GraphClient,
	applicationId string,
	id string,
) *FederatedIdentityCredentialItemRequestBuilder

func (*FederatedIdentityCredentialItemRequestBuilder) Delete

Gets a Microsoft Graph Application for the specified application identifier

func (*FederatedIdentityCredentialItemRequestBuilder) Get

Gets a Microsoft Graph Application for the specified application identifier

func (*FederatedIdentityCredentialItemRequestBuilder) Update

func (c *FederatedIdentityCredentialItemRequestBuilder) Update(
	ctx context.Context,
	federatedIdentityCredential *FederatedIdentityCredential,
) error

type FederatedIdentityCredentialListRequestBuilder

type FederatedIdentityCredentialListRequestBuilder struct {
	*EntityListRequestBuilder[FederatedIdentityCredentialListRequestBuilder]
	// contains filtered or unexported fields
}

func NewFederatedIdentityCredentialListRequestBuilder

func NewFederatedIdentityCredentialListRequestBuilder(
	client *GraphClient,
	applicationId string,
) *FederatedIdentityCredentialListRequestBuilder

func (*FederatedIdentityCredentialListRequestBuilder) Get

Gets a list of applications that the current logged in user has access to.

func (*FederatedIdentityCredentialListRequestBuilder) Post

type FederatedIdentityCredentialListResponse

type FederatedIdentityCredentialListResponse struct {
	Value []FederatedIdentityCredential `json:"value"`
}

type GraphClient

type GraphClient struct {
	// contains filtered or unexported fields
}

func NewGraphClient

func NewGraphClient(
	credential azcore.TokenCredential,
	options *azcore.ClientOptions,
) (*GraphClient, error)

Creates a new instance of the Microsoft Graph client

func (*GraphClient) ApplicationById

func (c *GraphClient) ApplicationById(id string) *ApplicationItemRequestBuilder

func (*GraphClient) Applications

func (c *GraphClient) Applications() *ApplicationListRequestBuilder

func (*GraphClient) Me

Me

func (*GraphClient) ServicePrincipalById

func (c *GraphClient) ServicePrincipalById(id string) *ServicePrincipalItemRequestBuilder

func (*GraphClient) ServicePrincipals

func (c *GraphClient) ServicePrincipals() *ServicePrincipalListRequestBuilder

type MeItemRequestBuilder

type MeItemRequestBuilder struct {
	*EntityItemRequestBuilder[MeItemRequestBuilder]
}

func (*MeItemRequestBuilder) Get

Gets the user profile information for the current logged in user

type ServicePrincipal

type ServicePrincipal struct {
	Id                     *string `json:"id"`
	DisplayName            string  `json:"displayName"`
	AppId                  string  `json:"appId"`
	AppOwnerOrganizationId *string `json:"appOwnerOrganizationId"`
	AppDisplayName         *string `json:"appDisplayName"`
	Description            *string `json:"appDescription"`
	Type                   *string `json:"servicePrincipalType"`
}

A Microsoft Graph Service Principal entity.

type ServicePrincipalCreateRequest

type ServicePrincipalCreateRequest struct {
	AppId string `json:"appId"`
}

type ServicePrincipalItemRequestBuilder

type ServicePrincipalItemRequestBuilder struct {
	*EntityItemRequestBuilder[ServicePrincipalItemRequestBuilder]
}

func NewServicePrincipalItemRequestBuilder

func NewServicePrincipalItemRequestBuilder(client *GraphClient, id string) *ServicePrincipalItemRequestBuilder

func (*ServicePrincipalItemRequestBuilder) Delete

func (*ServicePrincipalItemRequestBuilder) Get

Gets a Microsoft Graph Service Principal for the specified service principal identifier

type ServicePrincipalListRequestBuilder

type ServicePrincipalListRequestBuilder struct {
	*EntityListRequestBuilder[ServicePrincipalListRequestBuilder]
}

func NewServicePrincipalListRequestBuilder

func NewServicePrincipalListRequestBuilder(client *GraphClient) *ServicePrincipalListRequestBuilder

func (*ServicePrincipalListRequestBuilder) Get

Gets a list of Microsoft Graph Service Principals that the current logged in user has access to.

func (*ServicePrincipalListRequestBuilder) Post

type ServicePrincipalListResponse

type ServicePrincipalListResponse struct {
	Value []ServicePrincipal `json:"value"`
}

A list of service principals returned from the Microsoft Graph.

type UserProfile

type UserProfile struct {
	Id                string   `json:"id"`
	DisplayName       string   `json:"displayName"`
	GivenName         string   `json:"givenName"`
	Surname           string   `json:"surname"`
	JobTitle          string   `json:"jobTitle"`
	Mail              string   `json:"mail"`
	OfficeLocation    string   `json:"officeLocation"`
	UserPrincipalName string   `json:"userPrincipalName"`
	BusinessPhones    []string `json:"businessPhones"`
}

A Microsoft Graph UserProfile entity.

Jump to

Keyboard shortcuts

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