@@ -18,24 +18,24 @@ func (g *GraphAPIHandler) SetBaseDomain() string {
1818}
1919
2020// ConstructAPIResourceEndpoint constructs the full URL for a graph API resource endpoint path and logs the URL.
21- func (g * GraphAPIHandler ) ConstructAPIResourceEndpoint (instanceName string , endpointPath string , log logger.Logger ) string {
21+ func (g * GraphAPIHandler ) ConstructAPIResourceEndpoint (tenantName string , endpointPath string , log logger.Logger ) string {
2222 urlBaseDomain := g .SetBaseDomain ()
23- url := fmt .Sprintf ("https://%s%s%s" , instanceName , urlBaseDomain , endpointPath )
23+ url := fmt .Sprintf ("https://%s%s%s" , tenantName , urlBaseDomain , endpointPath )
2424 g .Logger .Debug (fmt .Sprintf ("Constructed %s API resource endpoint URL" , APIName ), zap .String ("URL" , url ))
2525 return url
2626}
2727
2828// ConstructAPIAuthEndpoint constructs the full URL for the Microsoft Graph API authentication endpoint.
29- // It uses the provided tenant name and endpoint path and logs the constructed URL.
30- func (g * GraphAPIHandler ) ConstructAPIAuthEndpoint (tenantName string , endpointPath string , log logger.Logger ) string {
29+ // It uses the provided tenant ID and endpoint path and logs the constructed URL.
30+ func (g * GraphAPIHandler ) ConstructAPIAuthEndpoint (tenantID string , endpointPath string , log logger.Logger ) string {
3131 // The base URL for the Microsoft Graph API authentication endpoint.
3232 const baseURL = "https://login.microsoftonline.com"
3333
34- // Construct the full URL by combining the base URL, tenant name , and endpoint path.
35- url := fmt .Sprintf ("%s/%s%s" , baseURL , tenantName , endpointPath )
34+ // Construct the full URL by combining the base URL, tenant ID , and endpoint path.
35+ url := fmt .Sprintf ("%s/%s%s" , baseURL , tenantID , endpointPath )
3636
3737 // Log the constructed URL for debugging purposes.
38- log .Debug (fmt . Sprintf ( "Constructed Microsoft Graph API authentication URL") , zap .String ("URL" , url ))
38+ log .Debug ("constructed Microsoft Graph API authentication URL" , zap .String ("URL" , url ))
3939
4040 return url
4141}
0 commit comments