Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 782 Bytes

assign-appliesto-ex1-go-snippets.md

File metadata and controls

26 lines (18 loc) · 782 Bytes
description
Automatically generated file. DO NOT MODIFY
// Code snippets are only available for the latest major version. Current major version is $v1.*// Dependenciesimport ( "context" msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go" graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"//other-imports ) requestBody:=graphmodels.NewReferenceCreate() odataId:="https://graph.microsoft.com/v1.0/policies/appManagementPolicies/{id}"requestBody.SetOdataId(&odataId) // To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=gographClient.Applications().ByApplicationId("application-id").AppManagementPolicies().Ref().Post(context.Background(), requestBody, nil) 
close