This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# Make sure you have installed the Azure PowerShell cmdlets: https://www.windowsazure.com/en-us/manage/downloads/ and then reboot #> | |
<# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
The steps need to be run individually | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #> | |
<# Step 1: Run this first to download your publisher file from Azure #> | |
Get-AzurePublishSettingsFile | |
<# Step 2: Change the path to the file you downloaded: C:\xxx\xxx.publishsettings #> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# Make sure you have installed the Azure PowerShell cmdlets: https://www.windowsazure.com/en-us/manage/downloads/ and then reboot #> | |
<# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
The steps need to be run individually | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #> | |
<# Step 1: Run this first to download your publisher file from Azure #> | |
Get-AzurePublishSettingsFile | |
<# Step 2: Change the path to the file you downloaded: C:\xxx\xxx.publishsettings #> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Attribute VB_Name = "CrmAuth" | |
Option Explicit | |
' Use the PtrSafe attribute for x64 installations | |
Private Declare PtrSafe Function FileTimeToLocalFileTime Lib "Kernel32" (lpFileTime As FILETIME, ByRef lpLocalFileTime As FILETIME) As Long | |
Private Declare PtrSafe Function LocalFileTimeToFileTime Lib "Kernel32" (lpLocalFileTime As FILETIME, ByRef lpFileTime As FILETIME) As Long | |
Private Declare PtrSafe Function SystemTimeToFileTime Lib "Kernel32" (lpSystemTime As SYSTEMTIME, ByRef lpFileTime As FILETIME) As Long | |
Private Declare PtrSafe Function FileTimeToSystemTime Lib "Kernel32" (lpFileTime As FILETIME, ByRef lpSystemTime As SYSTEMTIME) As Long | |
Public Type FILETIME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override void Initialize(AnalysisContext context) | |
{ | |
context.RegisterSyntaxNodeAction(AnalyzeBal, SyntaxKind.BracketedArgumentList); | |
} | |
private static void AnalyzeBal(SyntaxNodeAnalysisContext context) | |
{ | |
SyntaxNode node = context.Node; | |
if (!node.IsKind(SyntaxKind.BracketedArgumentList)) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public sealed override async Task ComputeFixesAsync(CodeFixContext context) | |
{ | |
var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); | |
var diagnostic = context.Diagnostics.First(); | |
var diagnosticSpan = diagnostic.Location.SourceSpan; | |
// Find the type declaration identified by the diagnostic. | |
var declaration = root.FindToken(diagnosticSpan.Start).Parent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Foundation; | |
using Microsoft.IdentityModel.Clients.ActiveDirectory; | |
using System; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using UIKit; | |
namespace YourNamespace | |
{ | |
public class CrmOauth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Requires jQuery - http://jquery.com/ | |
//Requires jsSHA (sha1.js) - http://caligatio.github.io/jsSHA/ | |
Xrm = window.Xrm || { __namespace: true }; | |
Xrm.CRMAuth = Xrm.CRMAuth || { __namespace: true }; | |
/// <summary>Gets a CRM Online SOAP header & expiration.</summary> | |
/// <param name="url" type="String">The Url of the CRM Online organization (https://org.crm.dynamics.com).</param> | |
/// <param name="username" type="String">Username of a valid CRM user.</param> | |
/// <param name="password" type="String">Password of a valid CRM user.</param> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// include "CrmAuthenticationHeader.php"; | |
class CrmAuth { | |
/** | |
* Gets a CRM Online SOAP header & expiration. | |
* | |
* @return CrmAuthenticationHeader An object containing the SOAP header and expiration date/time of the header. | |
* @param String $username |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string clientId = "00000000-0000-0000-0000-000000000000"; | |
string clientSecret = "00000000000000000000000000000000000000000000"; | |
string tenantId = "00000000-0000-0000-0000-000000000000"; | |
//Retrieve the access token required for authentication | |
var getTokenTask = Task.Run(async () => await GetToken(clientId, clientSecret, tenantId)); | |
Task.WaitAll(getTokenTask); | |
if (getTokenTask.Result == null) | |
throw new InvalidPluginExecutionException("Error retrieving access token"); | |
//Deserialize the token response to get the access token |
OlderNewer